File indexing completed on 2025-11-19 09:50:53
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 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000
0047 PyAPI_FUNC(PyObject *) PyImport_AddModuleRef(
0048 const char *name
0049 );
0050 #endif
0051 PyAPI_FUNC(PyObject *) PyImport_ImportModule(
0052 const char *name
0053 );
0054 Py_DEPRECATED(3.13) PyAPI_FUNC(PyObject *) PyImport_ImportModuleNoBlock(
0055 const char *name
0056 );
0057 PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel(
0058 const char *name,
0059 PyObject *globals,
0060 PyObject *locals,
0061 PyObject *fromlist,
0062 int level
0063 );
0064 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
0065 PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevelObject(
0066 PyObject *name,
0067 PyObject *globals,
0068 PyObject *locals,
0069 PyObject *fromlist,
0070 int level
0071 );
0072 #endif
0073
0074 #define PyImport_ImportModuleEx(n, g, l, f) \
0075 PyImport_ImportModuleLevel((n), (g), (l), (f), 0)
0076
0077 PyAPI_FUNC(PyObject *) PyImport_GetImporter(PyObject *path);
0078 PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name);
0079 PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m);
0080 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
0081 PyAPI_FUNC(int) PyImport_ImportFrozenModuleObject(
0082 PyObject *name
0083 );
0084 #endif
0085 PyAPI_FUNC(int) PyImport_ImportFrozenModule(
0086 const char *name
0087 );
0088
0089 PyAPI_FUNC(int) PyImport_AppendInittab(
0090 const char *name,
0091 PyObject* (*initfunc)(void)
0092 );
0093
0094 #ifndef Py_LIMITED_API
0095 # define Py_CPYTHON_IMPORT_H
0096 # include "cpython/import.h"
0097 # undef Py_CPYTHON_IMPORT_H
0098 #endif
0099
0100 #ifdef __cplusplus
0101 }
0102 #endif
0103 #endif