parameters: (obj)
return_statement: return bytes(out), length, kind, is_ascii, hashv.value
docstring: Get string data from a python string for use at compile-time to embed
      the string data into the LLVM module.
docstring_summary: Get string data from a python string for use at compile-time to embed
      the string data into the LLVM module.
docstring_tokens: Get string data from a python string for use at compile - time to embed the string data into the LLVM module .
function: def compile_time_get_string_data(obj):
      """Get string data from a python string for use at compile-time to embed
      the string data into the LLVM module.
      """
      from ctypes import (
          CFUNCTYPE, c_void_p, c_int, c_uint, c_ssize_t, c_ubyte, py_object,
          POINTER, byref,
      )
  
      extract_unicode_fn = c_helpers['extract_unicode']
      proto = CFUNCTYPE(c_void_p, py_object, POINTER(c_ssize_t), POINTER(c_int),
                        POINTER(c_uint), POINTER(c_ssize_t))
      fn = proto(extract_unicode_fn)
      length = c_ssize_t()
      kind = c_int()
      is_ascii = c_uint()
      hashv = c_ssize_t()
      data = fn(obj, byref(length), byref(kind), byref(is_ascii), byref(hashv))
      if data is None:
          raise ValueError("cannot extract unicode data from the given string")
      length = length.value
      kind = kind.value
      is_ascii = is_ascii.value
      nbytes = (length + 1) * _kind_to_byte_width(kind)
      out = (c_ubyte * nbytes).from_address(data)
      return bytes(out), length, kind, is_ascii, hashv.value
function_tokens: def compile_time_get_string_data ( obj ) : from ctypes import ( CFUNCTYPE , c_void_p , c_int , c_uint , c_ssize_t , c_ubyte , py_object , POINTER , byref , ) extract_unicode_fn = c_helpers [ 'extract_unicode' ] proto = CFUNCTYPE ( c_void_p , py_object , POINTER ( c_ssize_t ) , POINTER ( c_int ) , POINTER ( c_uint ) , POINTER ( c_ssize_t ) ) fn = proto ( extract_unicode_fn ) length = c_ssize_t ( ) kind = c_int ( ) is_ascii = c_uint ( ) hashv = c_ssize_t ( ) data = fn ( obj , byref ( length ) , byref ( kind ) , byref ( is_ascii ) , byref ( hashv ) ) if data is None : raise ValueError ( "cannot extract unicode data from the given string" ) length = length . value kind = kind . value is_ascii = is_ascii . value nbytes = ( length + 1 ) * _kind_to_byte_width ( kind ) out = ( c_ubyte * nbytes ) . from_address ( data ) return bytes ( out ) , length , kind , is_ascii , hashv . value