File indexing completed on 2025-01-18 10:06:49
0001
0002
0003 #ifndef Py_IMPORT_H
0004 #define Py_IMPORT_H
0005 #ifdef __cplusplus
0006 extern "C" {
0007 #endif
0008
0009 PyAPI_FUNC(long) PyImport_GetMagicNumber(void);
0010 PyAPI_FUNC(const char *) PyImport_GetMagicTag(void);
0011 PyAPI_FUNC(PyObject *) PyImport_ExecCodeModule(
0012 const char *name,
0013 PyObject *co
0014 );
0015 PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleEx(
0016 const char *name,
0017 PyObject *co,
0018 const char *pathname
0019 );
0020 PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleWithPathnames(
0021 const char *name,
0022 PyObject *co,
0023 const char *pathname,
0024 const char *cpathname
0025 );
0026 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
0027 PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleObject(
0028 PyObject *name,
0029 PyObject *co,
0030 PyObject *pathname,
0031 PyObject *cpathname
0032 );
0033 #endif
0034 PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void);
0035 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
0036 PyAPI_FUNC(PyObject *) PyImport_GetModule(PyObject *name);
0037 #endif
0038 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
0039 PyAPI_FUNC(PyObject *) PyImport_AddModuleObject(
0040 PyObject *name
0041 );
0042 #endif
0043 PyAPI_FUNC(PyObject *) PyImport_AddModule(
0044 const char *name
0045 );
0046 PyAPI_FUNC(PyObject *) PyImport_ImportModule(
0047 const char *name
0048 );
0049 PyAPI_FUNC(PyObject *) PyImport_ImportModuleNoBlock(
0050 const char *name
0051 );
0052 PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel(
0053 const char *name,
0054 PyObject *globals,
0055 PyObject *locals,
0056 PyObject *fromlist,
0057 int level
0058 );
0059 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
0060 PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevelObject(
0061 PyObject *name,
0062 PyObject *globals,
0063 PyObject *locals,
0064 PyObject *fromlist,
0065 int level
0066 );
0067 #endif
0068
0069 #define PyImport_ImportModuleEx(n, g, l, f) \
0070 PyImport_ImportModuleLevel((n), (g), (l), (f), 0)
0071
0072 PyAPI_FUNC(PyObject *) PyImport_GetImporter(PyObject *path);
0073 PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name);
0074 PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m);
0075 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
0076 PyAPI_FUNC(int) PyImport_ImportFrozenModuleObject(
0077 PyObject *name
0078 );
0079 #endif
0080 PyAPI_FUNC(int) PyImport_ImportFrozenModule(
0081 const char *name
0082 );
0083
0084 PyAPI_FUNC(int) PyImport_AppendInittab(
0085 const char *name,
0086 PyObject* (*initfunc)(void)
0087 );
0088
0089 #ifndef Py_LIMITED_API
0090 # define Py_CPYTHON_IMPORT_H
0091 # include "cpython/import.h"
0092 # undef Py_CPYTHON_IMPORT_H
0093 #endif
0094
0095 #ifdef __cplusplus
0096 }
0097 #endif
0098 #endif