Victor Stinner | 01b63ec | 2019-06-19 00:48:09 +0200 | [diff] [blame] | 1 | #ifndef Py_CPYTHON_IMPORT_H |
| 2 | # error "this header file must not be included directly" |
| 3 | #endif |
| 4 | |
| 5 | #ifdef __cplusplus |
| 6 | extern "C" { |
| 7 | #endif |
| 8 | |
| 9 | PyMODINIT_FUNC PyInit__imp(void); |
| 10 | |
| 11 | PyAPI_FUNC(int) _PyImport_IsInitialized(PyInterpreterState *); |
| 12 | |
| 13 | PyAPI_FUNC(PyObject *) _PyImport_GetModuleId(struct _Py_Identifier *name); |
Victor Stinner | 01b63ec | 2019-06-19 00:48:09 +0200 | [diff] [blame] | 14 | PyAPI_FUNC(int) _PyImport_SetModule(PyObject *name, PyObject *module); |
| 15 | PyAPI_FUNC(int) _PyImport_SetModuleString(const char *name, PyObject* module); |
| 16 | |
| 17 | PyAPI_FUNC(void) _PyImport_AcquireLock(void); |
| 18 | PyAPI_FUNC(int) _PyImport_ReleaseLock(void); |
| 19 | |
Victor Stinner | 01b63ec | 2019-06-19 00:48:09 +0200 | [diff] [blame] | 20 | PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObject(PyObject *, PyObject *); |
Victor Stinner | 0a28f8d | 2019-06-19 02:54:39 +0200 | [diff] [blame] | 21 | |
Victor Stinner | 01b63ec | 2019-06-19 00:48:09 +0200 | [diff] [blame] | 22 | PyAPI_FUNC(int) _PyImport_FixupBuiltin( |
| 23 | PyObject *mod, |
| 24 | const char *name, /* UTF-8 encoded string */ |
| 25 | PyObject *modules |
| 26 | ); |
| 27 | PyAPI_FUNC(int) _PyImport_FixupExtensionObject(PyObject*, PyObject *, |
| 28 | PyObject *, PyObject *); |
| 29 | |
| 30 | struct _inittab { |
| 31 | const char *name; /* ASCII encoded string */ |
| 32 | PyObject* (*initfunc)(void); |
| 33 | }; |
| 34 | PyAPI_DATA(struct _inittab *) PyImport_Inittab; |
| 35 | PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab); |
| 36 | |
| 37 | struct _frozen { |
| 38 | const char *name; /* ASCII encoded string */ |
| 39 | const unsigned char *code; |
| 40 | int size; |
| 41 | }; |
| 42 | |
| 43 | /* Embedding apps may change this pointer to point to their favorite |
| 44 | collection of frozen modules: */ |
| 45 | |
| 46 | PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules; |
| 47 | |
| 48 | #ifdef __cplusplus |
| 49 | } |
| 50 | #endif |