(self, fname)
Write ctypes struct and function type declarations.
Write ctypes struct and function type declarations.
Write ctypes struct and function type declarations .
def write_types(self, fname):
    """Write ctypes struct and function type declarations."""
    imports = [
        "import ctypes",
    ]
    with open(fname, "w") as f:
      f.write(self.make_header(imports))
      f.write(codegen_util.comment_line(
          "ctypes struct, union, and function type declarations"))
      for type_decl in self.types_dict.values():
        f.write("\n" + type_decl.ctypes_decl)
      f.write("\n" + codegen_util.comment_line("End of generated code"))
def write_types ( self , fname ) : imports = [ "import ctypes" , ] with open ( fname , "w" ) as f : f . write ( self . make_header ( imports ) ) f . write ( codegen_util . comment_line ( "ctypes struct, union, and function type declarations" ) ) for type_decl in self . types_dict . values ( ) : f . write ( "\n" + type_decl . ctypes_decl ) f . write ( "\n" + codegen_util . comment_line ( "End of generated code" ) )