-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add Include/cpython/import.h and Include/internal/pycore_import.h header files. * Move _PyImport_ReInitLock() to the internal C API. Don't export the symbol anymore.
- Loading branch information
Showing
7 changed files
with
86 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#ifndef Py_CPYTHON_IMPORT_H | ||
# error "this header file must not be included directly" | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
PyMODINIT_FUNC PyInit__imp(void); | ||
|
||
PyAPI_FUNC(int) _PyImport_IsInitialized(PyInterpreterState *); | ||
|
||
PyAPI_FUNC(PyObject *) _PyImport_GetModuleId(struct _Py_Identifier *name); | ||
PyAPI_FUNC(PyObject *) _PyImport_AddModuleObject(PyObject *name, | ||
PyObject *modules); | ||
PyAPI_FUNC(int) _PyImport_SetModule(PyObject *name, PyObject *module); | ||
PyAPI_FUNC(int) _PyImport_SetModuleString(const char *name, PyObject* module); | ||
|
||
PyAPI_FUNC(void) _PyImport_AcquireLock(void); | ||
PyAPI_FUNC(int) _PyImport_ReleaseLock(void); | ||
|
||
PyAPI_FUNC(PyObject *) _PyImport_FindBuiltin( | ||
const char *name, /* UTF-8 encoded string */ | ||
PyObject *modules | ||
); | ||
PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObject(PyObject *, PyObject *); | ||
PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObjectEx(PyObject *, PyObject *, | ||
PyObject *); | ||
PyAPI_FUNC(int) _PyImport_FixupBuiltin( | ||
PyObject *mod, | ||
const char *name, /* UTF-8 encoded string */ | ||
PyObject *modules | ||
); | ||
PyAPI_FUNC(int) _PyImport_FixupExtensionObject(PyObject*, PyObject *, | ||
PyObject *, PyObject *); | ||
|
||
struct _inittab { | ||
const char *name; /* ASCII encoded string */ | ||
PyObject* (*initfunc)(void); | ||
}; | ||
PyAPI_DATA(struct _inittab *) PyImport_Inittab; | ||
PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab); | ||
|
||
struct _frozen { | ||
const char *name; /* ASCII encoded string */ | ||
const unsigned char *code; | ||
int size; | ||
}; | ||
|
||
/* Embedding apps may change this pointer to point to their favorite | ||
collection of frozen modules: */ | ||
|
||
PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef Py_LIMITED_API | ||
#ifndef Py_INTERNAL_IMPORT_H | ||
#define Py_INTERNAL_IMPORT_H | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
extern void _PyImport_ReInitLock(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif /* !Py_INTERNAL_IMPORT_H */ | ||
#endif /* !Py_LIMITED_API */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters