(self)
Generates a declaration for self as a field of a ctypes.Structure.
Generates a declaration for self as a field of a ctypes.Structure.
Generates a declaration for self as a field of a ctypes . Structure .
def ctypes_field_decl(self):
    """Generates a declaration for self as a field of a ctypes.Structure."""
    if self.typename in header_parsing.CTYPES_PTRS:
      return "('{0.name}', {0.ctypes_ptr} * {1})".format(  # pylint: disable=missing-format-attribute
          self, " * ".join(str(d) for d in self.shape))
    else:
      return "('{0.name}', {0.ctypes_typename} * {1})".format(  # pylint: disable=missing-format-attribute
          self, " * ".join(str(d) for d in self.shape))
def ctypes_field_decl ( self ) : if self . typename in header_parsing . CTYPES_PTRS : return "('{0.name}', {0.ctypes_ptr} * {1})" . format ( # pylint: disable=missing-format-attribute self , " * " . join ( str ( d ) for d in self . shape ) ) else : return "('{0.name}', {0.ctypes_typename} * {1})" . format ( # pylint: disable=missing-format-attribute self , " * " . join ( str ( d ) for d in self . shape ) )