cpython/Include/cpython/import.h
Victor Stinner 2e92edbf6d
gh-106320: Remove private _PyImport C API functions (#106383)
* Remove private _PyImport C API functions: move them to the internal
  C API (pycore_import.h).
* No longer export most of these private functions.
* _testcapi avoids private _PyImport_GetModuleAttrString().
2023-07-03 23:02:07 +00:00

26 lines
758 B
C

#ifndef Py_CPYTHON_IMPORT_H
# error "this header file must not be included directly"
#endif
PyMODINIT_FUNC PyInit__imp(void);
struct _inittab {
const char *name; /* ASCII encoded string */
PyObject* (*initfunc)(void);
};
// This is not used after Py_Initialize() is called.
PyAPI_DATA(struct _inittab *) PyImport_Inittab;
PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
struct _frozen {
const char *name; /* ASCII encoded string */
const unsigned char *code;
int size;
int is_package;
PyObject *(*get_code)(void);
};
/* Embedding apps may change this pointer to point to their favorite
collection of frozen modules: */
PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules;