| 1 |
#ifndef Py_CPYTHON_IMPORT_H |
| 2 |
# error "this header file must not be included directly" |
| 3 |
#endif |
| 4 |
|
| 5 |
struct _inittab { |
| 6 |
const char *name; /* ASCII encoded string */ |
| 7 |
PyObject* (*initfunc)(void); |
| 8 |
}; |
| 9 |
// This is not used after Py_Initialize() is called. |
| 10 |
PyAPI_DATA(struct _inittab *) PyImport_Inittab; |
| 11 |
PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab); |
| 12 |
|
| 13 |
struct _frozen { |
| 14 |
const char *name; /* ASCII encoded string */ |
| 15 |
const unsigned char *code; |
| 16 |
int size; |
| 17 |
int is_package; |
| 18 |
}; |
| 19 |
|
| 20 |
/* Embedding apps may change this pointer to point to their favorite |
| 21 |
collection of frozen modules: */ |
| 22 |
|
| 23 |
PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules; |
| 24 |
|
| 25 |
PyAPI_FUNC(PyObject*) PyImport_ImportModuleAttr( |
| 26 |
PyObject *mod_name, |
| 27 |
PyObject *attr_name); |
| 28 |
PyAPI_FUNC(PyObject*) PyImport_ImportModuleAttrString( |
| 29 |
const char *mod_name, |
| 30 |
const char *attr_name); |