codekingpro/portable-devtools
114k
1/* Module definition and import interface */2 3#ifndef Py_IMPORT_H4#define Py_IMPORT_H5#ifdef __cplusplus6extern "C" {7#endif8 9PyAPI_FUNC(long) PyImport_GetMagicNumber(void);10PyAPI_FUNC(const char *) PyImport_GetMagicTag(void);11PyAPI_FUNC(PyObject *) PyImport_ExecCodeModule(12 const char *name, /* UTF-8 encoded string */13 PyObject *co14 );15PyAPI_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 );20PyAPI_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 >= 0x0303000027PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleObject(28 PyObject *name,29 PyObject *co,30 PyObject *pathname,31 PyObject *cpathname32 );33#endif34PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void);35#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0307000036PyAPI_FUNC(PyObject *) PyImport_GetModule(PyObject *name);37#endif38#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0303000039PyAPI_FUNC(PyObject *) PyImport_AddModuleObject(40 PyObject *name41 );42#endif43PyAPI_FUNC(PyObject *) PyImport_AddModule(44 const char *name /* UTF-8 encoded string */45 );46#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d000047PyAPI_FUNC(PyObject *) PyImport_AddModuleRef(48 const char *name /* UTF-8 encoded string */49 );50#endif51PyAPI_FUNC(PyObject *) PyImport_ImportModule(52 const char *name /* UTF-8 encoded string */53 );54Py_DEPRECATED(3.13) PyAPI_FUNC(PyObject *) PyImport_ImportModuleNoBlock(55 const char *name /* UTF-8 encoded string */56 );57PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel(58 const char *name, /* UTF-8 encoded string */59 PyObject *globals,60 PyObject *locals,61 PyObject *fromlist,62 int level63 );64#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0305000065PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevelObject(66 PyObject *name,67 PyObject *globals,68 PyObject *locals,69 PyObject *fromlist,70 int level71 );72#endif73 74#define PyImport_ImportModuleEx(n, g, l, f) \75 PyImport_ImportModuleLevel((n), (g), (l), (f), 0)76 77PyAPI_FUNC(PyObject *) PyImport_GetImporter(PyObject *path);78PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name);79PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m);80#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0303000081PyAPI_FUNC(int) PyImport_ImportFrozenModuleObject(82 PyObject *name83 );84#endif85PyAPI_FUNC(int) PyImport_ImportFrozenModule(86 const char *name /* UTF-8 encoded string */87 );88 89PyAPI_FUNC(int) PyImport_AppendInittab(90 const char *name, /* ASCII encoded string */91 PyObject* (*initfunc)(void)92 );93 94#ifndef Py_LIMITED_API95# define Py_CPYTHON_IMPORT_H96# include "cpython/import.h"97# undef Py_CPYTHON_IMPORT_H98#endif99 100#ifdef __cplusplus101}102#endif103#endif /* !Py_IMPORT_H */104 