mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-107211: No longer export internal variables (#107218)
No longer export these 5 internal C API variables: * _PyBufferWrapper_Type * _PyImport_FrozenBootstrap * _PyImport_FrozenStdlib * _PyImport_FrozenTest * _Py_SwappedOp Fix the definition of these internal functions, replace PyAPI_DATA() with PyAPI_FUNC(): * _PyImport_ClearExtension() * _PyObject_IsFreed() * _PyThreadState_GetCurrent()
This commit is contained in:
parent
c5b13d6f80
commit
3b309319cc
6 changed files with 26 additions and 20 deletions
|
|
@ -187,9 +187,13 @@ struct _module_alias {
|
|||
const char *orig; /* ASCII encoded string */
|
||||
};
|
||||
|
||||
PyAPI_DATA(const struct _frozen *) _PyImport_FrozenBootstrap;
|
||||
PyAPI_DATA(const struct _frozen *) _PyImport_FrozenStdlib;
|
||||
PyAPI_DATA(const struct _frozen *) _PyImport_FrozenTest;
|
||||
// Export for test_ctypes
|
||||
PyAPI_DATA(const struct _frozen*) _PyImport_FrozenBootstrap;
|
||||
// Export for test_ctypes
|
||||
PyAPI_DATA(const struct _frozen*) _PyImport_FrozenStdlib;
|
||||
// Export for test_ctypes
|
||||
PyAPI_DATA(const struct _frozen*) _PyImport_FrozenTest;
|
||||
|
||||
extern const struct _module_alias * _PyImport_FrozenAliases;
|
||||
|
||||
extern int _PyImport_CheckSubinterpIncompatibleExtensionAllowed(
|
||||
|
|
@ -197,7 +201,7 @@ extern int _PyImport_CheckSubinterpIncompatibleExtensionAllowed(
|
|||
|
||||
|
||||
// Export for '_testinternalcapi' shared extension
|
||||
PyAPI_DATA(int) _PyImport_ClearExtension(PyObject *name, PyObject *filename);
|
||||
PyAPI_FUNC(int) _PyImport_ClearExtension(PyObject *name, PyObject *filename);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue