1 | /* Module definition and import interface */ |
2 | |
3 | #ifndef Py_IMPORT_H |
4 | #define Py_IMPORT_H |
5 | #ifdef __cplusplus |
6 | extern "C" { |
7 | #endif |
8 | |
9 | PyAPI_FUNC(long) PyImport_GetMagicNumber(void); |
10 | PyAPI_FUNC(const char *) PyImport_GetMagicTag(void); |
11 | PyAPI_FUNC(PyObject *) PyImport_ExecCodeModule( |
12 | const char *name, /* UTF-8 encoded string */ |
13 | PyObject *co |
14 | ); |
15 | PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleEx( |
16 | const char *name, /* UTF-8 encoded string */ |
17 | PyObject *co, |
18 | const char *pathname /* decoded from the filesystem encoding */ |
19 | ); |
20 | PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleWithPathnames( |
21 | const char *name, /* UTF-8 encoded string */ |
22 | PyObject *co, |
23 | const char *pathname, /* decoded from the filesystem encoding */ |
24 | const char *cpathname /* decoded from the filesystem encoding */ |
25 | ); |
26 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000 |
27 | PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleObject( |
28 | PyObject *name, |
29 | PyObject *co, |
30 | PyObject *pathname, |
31 | PyObject *cpathname |
32 | ); |
33 | #endif |
34 | PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void); |
35 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 |
36 | PyAPI_FUNC(PyObject *) PyImport_GetModule(PyObject *name); |
37 | #endif |
38 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000 |
39 | PyAPI_FUNC(PyObject *) PyImport_AddModuleObject( |
40 | PyObject *name |
41 | ); |
42 | #endif |
43 | PyAPI_FUNC(PyObject *) PyImport_AddModule( |
44 | const char *name /* UTF-8 encoded string */ |
45 | ); |
46 | PyAPI_FUNC(PyObject *) PyImport_ImportModule( |
47 | const char *name /* UTF-8 encoded string */ |
48 | ); |
49 | PyAPI_FUNC(PyObject *) PyImport_ImportModuleNoBlock( |
50 | const char *name /* UTF-8 encoded string */ |
51 | ); |
52 | PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel( |
53 | const char *name, /* UTF-8 encoded string */ |
54 | PyObject *globals, |
55 | PyObject *locals, |
56 | PyObject *fromlist, |
57 | int level |
58 | ); |
59 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000 |
60 | PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevelObject( |
61 | PyObject *name, |
62 | PyObject *globals, |
63 | PyObject *locals, |
64 | PyObject *fromlist, |
65 | int level |
66 | ); |
67 | #endif |
68 | |
69 | #define PyImport_ImportModuleEx(n, g, l, f) \ |
70 | PyImport_ImportModuleLevel(n, g, l, f, 0) |
71 | |
72 | PyAPI_FUNC(PyObject *) PyImport_GetImporter(PyObject *path); |
73 | PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name); |
74 | PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m); |
75 | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000 |
76 | PyAPI_FUNC(int) PyImport_ImportFrozenModuleObject( |
77 | PyObject *name |
78 | ); |
79 | #endif |
80 | PyAPI_FUNC(int) PyImport_ImportFrozenModule( |
81 | const char *name /* UTF-8 encoded string */ |
82 | ); |
83 | |
84 | PyAPI_FUNC(int) PyImport_AppendInittab( |
85 | const char *name, /* ASCII encoded string */ |
86 | PyObject* (*initfunc)(void) |
87 | ); |
88 | |
89 | #ifndef Py_LIMITED_API |
90 | # define Py_CPYTHON_IMPORT_H |
91 | # include "cpython/import.h" |
92 | # undef Py_CPYTHON_IMPORT_H |
93 | #endif |
94 | |
95 | #ifdef __cplusplus |
96 | } |
97 | #endif |
98 | #endif /* !Py_IMPORT_H */ |
99 | |