mirror of
https://github.com/python/cpython.git
synced 2025-08-11 20:40:27 +00:00

* Unrevert "[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (gh-107567) (#107599)".
This reverts commit 6e4eec7606
(gh-107648).
* Initialize each interpreter's refchain properly.
* Skip test_basic_multiple_interpreters_deleted_no_reset on tracerefs builds.
36 lines
737 B
C
36 lines
737 B
C
#ifndef Py_INTERNAL_OBJECT_STATE_H
|
|
#define Py_INTERNAL_OBJECT_STATE_H
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifndef Py_BUILD_CORE
|
|
# error "this header requires Py_BUILD_CORE define"
|
|
#endif
|
|
|
|
struct _py_object_runtime_state {
|
|
#ifdef Py_REF_DEBUG
|
|
Py_ssize_t interpreter_leaks;
|
|
#endif
|
|
int _not_used;
|
|
};
|
|
|
|
struct _py_object_state {
|
|
#ifdef Py_REF_DEBUG
|
|
Py_ssize_t reftotal;
|
|
#endif
|
|
#ifdef Py_TRACE_REFS
|
|
/* Head of circular doubly-linked list of all objects. These are linked
|
|
* together via the _ob_prev and _ob_next members of a PyObject, which
|
|
* exist only in a Py_TRACE_REFS build.
|
|
*/
|
|
PyObject refchain;
|
|
#endif
|
|
int _not_used;
|
|
};
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* !Py_INTERNAL_OBJECT_STATE_H */
|