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 _apply_embedding_fix(self, kwds):
      # must include an argument like "-lpython2.7" for the compiler
      def ensure(key, value):
          lst = kwds.setdefault(key, [])
          if value not in lst:
              lst.append(value)
  
      #
      if "__pypy__" in sys.builtin_module_names:
          import os
  
          if sys.platform == "win32":
              # we need 'libpypy-c.lib'.  Current distributions of
              # pypy (>= 4.1) contain it as 'libs/python27.lib'.
              pythonlib = "python{0[0]}{0[1]}".format(sys.version_info)
              if hasattr(sys, "prefix"):
                  ensure(
                      "library_dirs", os.path.join(sys.prefix, "libs")
                  )
          else:
              # we need 'libpypy-c.{so,dylib}', which should be by
              # default located in 'sys.prefix/bin' for installed
              # systems.
              if sys.version_info < (3,):
                  pythonlib = "pypy-c"
              else:
                  pythonlib = "pypy3-c"
              if hasattr(sys, "prefix"):
                  ensure(
                      "library_dirs", os.path.join(sys.prefix, "bin")
                  )
          # On uninstalled pypy's, the libpypy-c is typically found in
          # .../pypy/goal/.
          if hasattr(sys, "prefix"):
              ensure(
                  "library_dirs",
                  os.path.join(sys.prefix, "pypy", "goal"),
              )
      else:
          if sys.platform == "win32":
              template = "python%d%d"
              if hasattr(sys, "gettotalrefcount"):
                  template += "_d"
          else:
              try:
                  import sysconfig
              except ImportError:  # 2.6
                  from distutils import sysconfig
              template = "python%d.%d"
              if sysconfig.get_config_var("DEBUG_EXT"):
                  template += sysconfig.get_config_var("DEBUG_EXT")
          pythonlib = template % (
              sys.hexversion >> 24,
              (sys.hexversion >> 16) & 0xFF,
          )
          if hasattr(sys, "abiflags"):
              pythonlib += sys.abiflags
      ensure("libraries", pythonlib)
      if sys.platform == "win32":
          ensure("extra_link_args", "/MANIFEST")
  
imports: import sys, types
  from .lock import allocate_lock
  from .error import CDefError
  from .None import model
label_desc: Use image node_id 37 for calling the FFI obj's underlying member method code with example usage: obj._apply_embedding_fix(kwds) without return types