Saved and restored logging._handlerList at the same time as saving/restoring logging...
[python.git] / Include / import.h
blob45cc6c93f2f8132d4ab82b1559bada56d2273282
2 /* Module definition and import interface */
4 #ifndef Py_IMPORT_H
5 #define Py_IMPORT_H
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 PyAPI_FUNC(long) PyImport_GetMagicNumber(void);
11 PyAPI_FUNC(PyObject *) PyImport_ExecCodeModule(char *name, PyObject *co);
12 PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleEx(
13 char *name, PyObject *co, char *pathname);
14 PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void);
15 PyAPI_FUNC(PyObject *) PyImport_AddModule(const char *name);
16 PyAPI_FUNC(PyObject *) PyImport_ImportModule(const char *name);
17 PyAPI_FUNC(PyObject *) PyImport_ImportModuleEx(
18 char *name, PyObject *globals, PyObject *locals, PyObject *fromlist);
19 PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name);
20 PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m);
21 PyAPI_FUNC(void) PyImport_Cleanup(void);
22 PyAPI_FUNC(int) PyImport_ImportFrozenModule(char *);
24 PyAPI_FUNC(struct filedescr *) _PyImport_FindModule(
25 const char *, PyObject *, char *, size_t, FILE **, PyObject **);
26 PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr *);
27 PyAPI_FUNC(void) _PyImport_ReInitLock(void);
29 PyAPI_FUNC(PyObject *)_PyImport_FindExtension(char *, char *);
30 PyAPI_FUNC(PyObject *)_PyImport_FixupExtension(char *, char *);
32 struct _inittab {
33 char *name;
34 void (*initfunc)(void);
37 PyAPI_DATA(struct _inittab *) PyImport_Inittab;
39 PyAPI_FUNC(int) PyImport_AppendInittab(char *name, void (*initfunc)(void));
40 PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
42 struct _frozen {
43 char *name;
44 unsigned char *code;
45 int size;
48 /* Embedding apps may change this pointer to point to their favorite
49 collection of frozen modules: */
51 PyAPI_DATA(struct _frozen *) PyImport_FrozenModules;
53 #ifdef __cplusplus
55 #endif
56 #endif /* !Py_IMPORT_H */