]>
Commit | Line | Data |
---|---|---|
c8042e10 DM |
1 | \r |
2 | /* Module definition and import interface */\r | |
3 | \r | |
4 | #ifndef Py_IMPORT_H\r | |
5 | #define Py_IMPORT_H\r | |
6 | #ifdef __cplusplus\r | |
7 | extern "C" {\r | |
8 | #endif\r | |
9 | \r | |
10 | PyAPI_FUNC(long) PyImport_GetMagicNumber(void);\r | |
11 | PyAPI_FUNC(PyObject *) PyImport_ExecCodeModule(char *name, PyObject *co);\r | |
12 | PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleEx(\r | |
13 | char *name, PyObject *co, char *pathname);\r | |
14 | PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void);\r | |
15 | PyAPI_FUNC(PyObject *) PyImport_AddModule(const char *name);\r | |
16 | PyAPI_FUNC(PyObject *) PyImport_ImportModule(const char *name);\r | |
17 | PyAPI_FUNC(PyObject *) PyImport_ImportModuleNoBlock(const char *);\r | |
18 | PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel(char *name,\r | |
19 | PyObject *globals, PyObject *locals, PyObject *fromlist, int level);\r | |
20 | \r | |
21 | #define PyImport_ImportModuleEx(n, g, l, f) \\r | |
22 | PyImport_ImportModuleLevel(n, g, l, f, -1)\r | |
23 | \r | |
24 | PyAPI_FUNC(PyObject *) PyImport_GetImporter(PyObject *path);\r | |
25 | PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name);\r | |
26 | PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m);\r | |
27 | PyAPI_FUNC(void) PyImport_Cleanup(void);\r | |
28 | PyAPI_FUNC(int) PyImport_ImportFrozenModule(char *);\r | |
29 | \r | |
30 | #ifdef WITH_THREAD\r | |
31 | PyAPI_FUNC(void) _PyImport_AcquireLock(void);\r | |
32 | PyAPI_FUNC(int) _PyImport_ReleaseLock(void);\r | |
33 | #else\r | |
34 | #define _PyImport_AcquireLock()\r | |
35 | #define _PyImport_ReleaseLock() 1\r | |
36 | #endif\r | |
37 | \r | |
38 | PyAPI_FUNC(struct filedescr *) _PyImport_FindModule(\r | |
39 | const char *, PyObject *, char *, size_t, FILE **, PyObject **);\r | |
40 | PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr *);\r | |
41 | PyAPI_FUNC(void) _PyImport_ReInitLock(void);\r | |
42 | \r | |
43 | PyAPI_FUNC(PyObject *) _PyImport_FindExtension(char *, char *);\r | |
44 | PyAPI_FUNC(PyObject *) _PyImport_FixupExtension(char *, char *);\r | |
45 | \r | |
46 | struct _inittab {\r | |
47 | char *name;\r | |
48 | void (*initfunc)(void);\r | |
49 | };\r | |
50 | \r | |
51 | PyAPI_DATA(PyTypeObject) PyNullImporter_Type;\r | |
52 | PyAPI_DATA(struct _inittab *) PyImport_Inittab;\r | |
53 | \r | |
54 | PyAPI_FUNC(int) PyImport_AppendInittab(const char *name, void (*initfunc)(void));\r | |
55 | PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);\r | |
56 | \r | |
57 | struct _frozen {\r | |
58 | char *name;\r | |
59 | unsigned char *code;\r | |
60 | int size;\r | |
61 | };\r | |
62 | \r | |
63 | /* Embedding apps may change this pointer to point to their favorite\r | |
64 | collection of frozen modules: */\r | |
65 | \r | |
66 | PyAPI_DATA(struct _frozen *) PyImport_FrozenModules;\r | |
67 | \r | |
68 | #ifdef __cplusplus\r | |
69 | }\r | |
70 | #endif\r | |
71 | #endif /* !Py_IMPORT_H */\r |