(self, cdll_name="")
return "{0} = {1}.in_dll({2}, {3!r})\n".format(
        self.name, ptr_str, cdll_name, self.symbol_name)
Generates a ctypes export statement.
Generates a ctypes export statement.
Generates a ctypes export statement .
def ctypes_var_decl(self, cdll_name=""):
    """Generates a ctypes export statement."""

    ptr_str = "ctypes.c_char_p"
    for dim in self.shape[::-1]:
      ptr_str = "({0} * {1!s})".format(ptr_str, dim)

    return "{0} = {1}.in_dll({2}, {3!r})\n".format(
        self.name, ptr_str, cdll_name, self.symbol_name)
def ctypes_var_decl ( self , cdll_name = "" ) : ptr_str = "ctypes.c_char_p" for dim in self . shape [ : : - 1 ] : ptr_str = "({0} * {1!s})" . format ( ptr_str , dim ) return "{0} = {1}.in_dll({2}, {3!r})\n" . format ( self . name , ptr_str , cdll_name , self . symbol_name )