bpo-46370: Move the static initializer for _PyRuntime to its own header file. (gh-30587)

https://bugs.python.org/issue46370
This commit is contained in:
Eric Snow 2022-01-13 15:54:36 -07:00 committed by GitHub
parent 276c234ce0
commit bc02eac9d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 611 additions and 583 deletions

View file

@ -12,6 +12,19 @@ extern "C" {
#include "pycore_interp.h" // PyInterpreterState.gc
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#define _PyObject_IMMORTAL_INIT(type) \
{ \
.ob_refcnt = 999999999, \
.ob_type = type, \
}
#define _PyVarObject_IMMORTAL_INIT(type, size) \
{ \
.ob_base = _PyObject_IMMORTAL_INIT(type), \
.ob_size = size, \
}
PyAPI_FUNC(int) _PyType_CheckConsistency(PyTypeObject *type);
PyAPI_FUNC(int) _PyDict_CheckConsistency(PyObject *mp, int check_content);