mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
276c234ce0
commit
bc02eac9d2
9 changed files with 611 additions and 583 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue