(root)/
Python-3.11.7/
Include/
cpython/
import.h
       1  #ifndef Py_CPYTHON_IMPORT_H
       2  #  error "this header file must not be included directly"
       3  #endif
       4  
       5  PyMODINIT_FUNC PyInit__imp(void);
       6  
       7  PyAPI_FUNC(int) _PyImport_IsInitialized(PyInterpreterState *);
       8  
       9  PyAPI_FUNC(PyObject *) _PyImport_GetModuleId(_Py_Identifier *name);
      10  PyAPI_FUNC(int) _PyImport_SetModule(PyObject *name, PyObject *module);
      11  PyAPI_FUNC(int) _PyImport_SetModuleString(const char *name, PyObject* module);
      12  
      13  PyAPI_FUNC(void) _PyImport_AcquireLock(void);
      14  PyAPI_FUNC(int) _PyImport_ReleaseLock(void);
      15  
      16  PyAPI_FUNC(int) _PyImport_FixupBuiltin(
      17      PyObject *mod,
      18      const char *name,            /* UTF-8 encoded string */
      19      PyObject *modules
      20      );
      21  PyAPI_FUNC(int) _PyImport_FixupExtensionObject(PyObject*, PyObject *,
      22                                                 PyObject *, PyObject *);
      23  
      24  struct _inittab {
      25      const char *name;           /* ASCII encoded string */
      26      PyObject* (*initfunc)(void);
      27  };
      28  PyAPI_DATA(struct _inittab *) PyImport_Inittab;
      29  PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
      30  
      31  struct _frozen {
      32      const char *name;                 /* ASCII encoded string */
      33      const unsigned char *code;
      34      int size;
      35      int is_package;
      36      PyObject *(*get_code)(void);
      37  };
      38  
      39  /* Embedding apps may change this pointer to point to their favorite
      40     collection of frozen modules: */
      41  
      42  PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules;
      43  
      44  PyAPI_DATA(PyObject *) _PyImport_GetModuleAttr(PyObject *, PyObject *);
      45  PyAPI_DATA(PyObject *) _PyImport_GetModuleAttrString(const char *, const char *);