class_docstr: The main top-level class that you instantiate once, or once per module.
  
  Example usage:
  
      ffi = FFI()
      ffi.cdef("""
          int printf(const char *, ...);
      """)
  
      C = ffi.dlopen(None)   # standard library
      -or-
      C = ffi.verify()  # use a C compiler: verify the decl above is right
  
      C.printf("hello, %s!\n", ffi.new("char[]", "world"))
class_docstr_tok: ["The","main","top-level","class","that","you","instantiate","once",",","or","once","per","module",".","Example","usage",":","ffi","=","FFI","(",")","ffi.cdef","(","``","''","''","int","printf","(","const","char","*",",","...",")",";","``","''","''",")","C","=","ffi.dlopen","(","None",")","#","standard","library","-or-","C","=","ffi.verify","(",")","#","use","a","C","compiler",":","verify","the","decl","above","is","right","C.printf","(","``","hello",",","%","s","!","\\n","''",",","ffi.new","(","``","char","[","]","''",",","``","world","''",")",")"]
code: def distutils_extension(self, tmpdir="build", verbose=True):
      from cffi._shimmed_dist_utils import mkpath
      from .recompiler import recompile
  
      #
      if not hasattr(self, "_assigned_source"):
          if hasattr(self, "verifier"):  # fallback, 'tmpdir' ignored
              return self.verifier.get_extension()
          raise ValueError(
              "set_source() must be called before"
              " distutils_extension()"
          )
      (
          module_name,
          source,
          source_extension,
          kwds,
      ) = self._assigned_source
      if source is None:
          raise TypeError(
              "distutils_extension() is only for C extension "
              "modules, not for dlopen()-style pure Python "
              "modules"
          )
      mkpath(tmpdir)
      ext, updated = recompile(
          self,
          module_name,
          source,
          tmpdir=tmpdir,
          extradir=tmpdir,
          source_extension=source_extension,
          call_c_compiler=False,
          **kwds,
      )
      if verbose:
          if updated:
              sys.stderr.write("regenerated: %r\n" % (ext.sources[0],))
          else:
              sys.stderr.write("not modified: %r\n" % (ext.sources[0],))
      return ext
  
imports: import sys, types
  from .lock import allocate_lock
  from .error import CDefError
  from .None import model
label_desc: Use image node_id 40 for calling the FFI obj's underlying member method code with example usage: obj.distutils_extension(tmpdir, verbose) and returns: ext, self