1 | |
2 | /* Module definition and import interface */ |
3 | |
4 | #ifndef Py_IMPORT_H |
5 | #define Py_IMPORT_H |
6 | #ifdef __cplusplus |
7 | extern "C" { |
8 | #endif |
9 | |
10 | PyAPI_FUNC(void) _PyImportZip_Init(void); |
11 | |
12 | PyMODINIT_FUNC PyInit_imp(void); |
13 | PyAPI_FUNC(long) PyImport_GetMagicNumber(void); |
14 | PyAPI_FUNC(const char *) PyImport_GetMagicTag(void); |
15 | PyAPI_FUNC(PyObject *) PyImport_ExecCodeModule( |
16 | const char *name, /* UTF-8 encoded string */ |
17 | PyObject *co |
18 | ); |
19 | PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleEx( |
20 | const char *name, /* UTF-8 encoded string */ |
21 | PyObject *co, |
22 | const char *pathname /* decoded from the filesystem encoding */ |
23 | ); |
24 | PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleWithPathnames( |
25 | const char *name, /* UTF-8 encoded string */ |
26 | PyObject *co, |
27 | const char *pathname, /* decoded from the filesystem encoding */ |
28 | const char *cpathname /* decoded from the filesystem encoding */ |
29 | ); |
30 | PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleObject( |
31 | PyObject *name, |
32 | PyObject *co, |
33 | PyObject *pathname, |
34 | PyObject *cpathname |
35 | ); |
36 | PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void); |
37 | PyAPI_FUNC(PyObject *) PyImport_AddModuleObject( |
38 | PyObject *name |
39 | ); |
40 | PyAPI_FUNC(PyObject *) PyImport_AddModule( |
41 | const char *name /* UTF-8 encoded string */ |
42 | ); |
43 | PyAPI_FUNC(PyObject *) PyImport_ImportModule( |
44 | const char *name /* UTF-8 encoded string */ |
45 | ); |
46 | PyAPI_FUNC(PyObject *) PyImport_ImportModuleNoBlock( |
47 | const char *name /* UTF-8 encoded string */ |
48 | ); |
49 | PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel( |
50 | const char *name, /* UTF-8 encoded string */ |
51 | PyObject *globals, |
52 | PyObject *locals, |
53 | PyObject *fromlist, |
54 | int level |
55 | ); |
56 | PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevelObject( |
57 | PyObject *name, |
58 | PyObject *globals, |
59 | PyObject *locals, |
60 | PyObject *fromlist, |
61 | int level |
62 | ); |
63 | |
64 | #define PyImport_ImportModuleEx(n, g, l, f) \ |
65 | PyImport_ImportModuleLevel(n, g, l, f, 0) |
66 | |
67 | PyAPI_FUNC(PyObject *) PyImport_GetImporter(PyObject *path); |
68 | PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name); |
69 | PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m); |
70 | PyAPI_FUNC(void) PyImport_Cleanup(void); |
71 | PyAPI_FUNC(int) PyImport_ImportFrozenModuleObject( |
72 | PyObject *name |
73 | ); |
74 | PyAPI_FUNC(int) PyImport_ImportFrozenModule( |
75 | const char *name /* UTF-8 encoded string */ |
76 | ); |
77 | |
78 | #ifndef Py_LIMITED_API |
79 | #ifdef WITH_THREAD |
80 | PyAPI_FUNC(void) _PyImport_AcquireLock(void); |
81 | PyAPI_FUNC(int) _PyImport_ReleaseLock(void); |
82 | #else |
83 | #define _PyImport_AcquireLock() |
84 | #define _PyImport_ReleaseLock() 1 |
85 | #endif |
86 | |
87 | PyAPI_FUNC(void) _PyImport_ReInitLock(void); |
88 | |
89 | PyAPI_FUNC(PyObject *) _PyImport_FindBuiltin( |
90 | const char *name /* UTF-8 encoded string */ |
91 | ); |
92 | PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObject(PyObject *, PyObject *); |
93 | PyAPI_FUNC(int) _PyImport_FixupBuiltin( |
94 | PyObject *mod, |
95 | const char *name /* UTF-8 encoded string */ |
96 | ); |
97 | PyAPI_FUNC(int) _PyImport_FixupExtensionObject(PyObject*, PyObject *, PyObject *); |
98 | |
99 | struct _inittab { |
100 | const char *name; /* ASCII encoded string */ |
101 | PyObject* (*initfunc)(void); |
102 | }; |
103 | PyAPI_DATA(struct _inittab *) PyImport_Inittab; |
104 | PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab); |
105 | #endif /* Py_LIMITED_API */ |
106 | |
107 | PyAPI_DATA(PyTypeObject) PyNullImporter_Type; |
108 | |
109 | PyAPI_FUNC(int) PyImport_AppendInittab( |
110 | const char *name, /* ASCII encoded string */ |
111 | PyObject* (*initfunc)(void) |
112 | ); |
113 | |
114 | #ifndef Py_LIMITED_API |
115 | struct _frozen { |
116 | const char *name; /* ASCII encoded string */ |
117 | const unsigned char *code; |
118 | int size; |
119 | }; |
120 | |
121 | /* Embedding apps may change this pointer to point to their favorite |
122 | collection of frozen modules: */ |
123 | |
124 | PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules; |
125 | #endif |
126 | |
127 | #ifdef __cplusplus |
128 | } |
129 | #endif |
130 | #endif /* !Py_IMPORT_H */ |
131 | |