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); |
| 14 | PyAPI_FUNC(PyObject *) _PyImport_AddModuleObject(PyObject *name, |
| 15 | PyObject *modules); |
| 16 | PyAPI_FUNC(int) _PyImport_SetModule(PyObject *name, PyObject *module); |
| 17 | PyAPI_FUNC(int) _PyImport_SetModuleString(const char *name, PyObject* module); |
| 18 | |
| 19 | PyAPI_FUNC(void) _PyImport_AcquireLock(void); |
| 20 | PyAPI_FUNC(int) _PyImport_ReleaseLock(void); |
| 21 | |
| 22 | PyAPI_FUNC(PyObject *) _PyImport_FindBuiltin( |
| 23 | const char *name, /* UTF-8 encoded string */ |
| 24 | PyObject *modules |
| 25 | ); |
| 26 | PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObject(PyObject *, PyObject *); |
| 27 | PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObjectEx(PyObject *, PyObject *, |
| 28 | PyObject *); |
| 29 | PyAPI_FUNC(int) _PyImport_FixupBuiltin( |
| 30 | PyObject *mod, |
| 31 | const char *name, /* UTF-8 encoded string */ |
| 32 | PyObject *modules |
| 33 | ); |
| 34 | PyAPI_FUNC(int) _PyImport_FixupExtensionObject(PyObject*, PyObject *, |
| 35 | PyObject *, PyObject *); |
| 36 | |
| 37 | struct _inittab { |
| 38 | const char *name; /* ASCII encoded string */ |
| 39 | PyObject* (*initfunc)(void); |
| 40 | }; |
| 41 | PyAPI_DATA(struct _inittab *) PyImport_Inittab; |
| 42 | PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab); |
| 43 | |
| 44 | struct _frozen { |
| 45 | const char *name; /* ASCII encoded string */ |
| 46 | const unsigned char *code; |
| 47 | int size; |
| 48 | }; |
| 49 | |
| 50 | /* Embedding apps may change this pointer to point to their favorite |
| 51 | collection of frozen modules: */ |
| 52 | |
| 53 | PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules; |
| 54 | |
| 55 | #ifdef __cplusplus |
| 56 | } |
| 57 | #endif |