Merged release21-maint changes.
[python/dscho.git] / Include / import.h
blobf90dd2081b7e72304a846c69f2bfd33615663187
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 DL_IMPORT(long) PyImport_GetMagicNumber(void);
11 DL_IMPORT(PyObject *) PyImport_ExecCodeModule(char *name, PyObject *co);
12 DL_IMPORT(PyObject *) PyImport_ExecCodeModuleEx(
13 char *name, PyObject *co, char *pathname);
14 DL_IMPORT(PyObject *) PyImport_GetModuleDict(void);
15 DL_IMPORT(PyObject *) PyImport_AddModule(char *name);
16 DL_IMPORT(PyObject *) PyImport_ImportModule(char *name);
17 DL_IMPORT(PyObject *) PyImport_ImportModuleEx(
18 char *name, PyObject *globals, PyObject *locals, PyObject *fromlist);
19 DL_IMPORT(PyObject *) PyImport_Import(PyObject *name);
20 DL_IMPORT(PyObject *) PyImport_ReloadModule(PyObject *m);
21 DL_IMPORT(void) PyImport_Cleanup(void);
22 DL_IMPORT(int) PyImport_ImportFrozenModule(char *);
24 extern DL_IMPORT(PyObject *)_PyImport_FindExtension(char *, char *);
25 extern DL_IMPORT(PyObject *)_PyImport_FixupExtension(char *, char *);
27 struct _inittab {
28 char *name;
29 void (*initfunc)(void);
32 extern DL_IMPORT(struct _inittab *) PyImport_Inittab;
34 extern DL_IMPORT(int) PyImport_AppendInittab(char *name, void (*initfunc)(void));
35 extern DL_IMPORT(int) PyImport_ExtendInittab(struct _inittab *newtab);
37 struct _frozen {
38 char *name;
39 unsigned char *code;
40 int size;
43 /* Embedding apps may change this pointer to point to their favorite
44 collection of frozen modules: */
46 extern DL_IMPORT(struct _frozen *) PyImport_FrozenModules;
48 #ifdef __cplusplus
50 #endif
51 #endif /* !Py_IMPORT_H */