mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-90110: Fix the c-analyzer Tool (#102483)
Some incompatible changes had gone in, and the "ignore" lists weren't properly undated. This change fixes that. It's necessary prior to enabling test_check_c_globals, which I hope to do soon. Note that this does include moving last_resort_memory_error to PyInterpreterState. https://github.com/python/cpython/issues/90110
This commit is contained in:
parent
f9cdeb7b99
commit
8606697f49
11 changed files with 86 additions and 35 deletions
|
|
@ -86,6 +86,7 @@ struct _Py_interp_static_objects {
|
|||
// hamt_empty is here instead of global because of its weakreflist.
|
||||
_PyGC_Head_UNUSED _hamt_empty_gc_not_used;
|
||||
PyHamtObject hamt_empty;
|
||||
PyBaseExceptionObject last_resort_memory_error;
|
||||
} singletons;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
typedef PyObject *(*instrinsic_func1)(PyThreadState* tstate, PyObject *value);
|
||||
typedef PyObject *(*instrinsic_func2)(PyThreadState* tstate, PyObject *value1, PyObject *value2);
|
||||
|
||||
extern instrinsic_func1 _PyIntrinsics_UnaryFunctions[];
|
||||
extern instrinsic_func2 _PyIntrinsics_BinaryFunctions[];
|
||||
extern const instrinsic_func1 _PyIntrinsics_UnaryFunctions[];
|
||||
extern const instrinsic_func2 _PyIntrinsics_BinaryFunctions[];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ extern "C" {
|
|||
#include "pycore_obmalloc_init.h"
|
||||
|
||||
|
||||
extern PyTypeObject _PyExc_MemoryError;
|
||||
|
||||
|
||||
/* The static initializers defined here should only be used
|
||||
in the runtime init code (in pystate.c and pylifecycle.c). */
|
||||
|
||||
|
|
@ -120,6 +123,9 @@ extern "C" {
|
|||
.ob_base = _PyObject_IMMORTAL_INIT(&_PyHamt_Type), \
|
||||
.h_root = (PyHamtNode*)&_Py_SINGLETON(hamt_bitmap_node_empty), \
|
||||
}, \
|
||||
.last_resort_memory_error = { \
|
||||
_PyObject_IMMORTAL_INIT(&_PyExc_MemoryError), \
|
||||
}, \
|
||||
}, \
|
||||
}, \
|
||||
._initial_thread = _PyThreadState_INIT, \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue