File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ _PyObject_GET_WEAKREFS_LISTPTR(PyObject *op)
224
224
((PyTypeObject * )op )-> tp_flags & _Py_TPFLAGS_STATIC_BUILTIN ) {
225
225
static_builtin_state * state = _PyStaticType_GetState (
226
226
(PyTypeObject * )op );
227
- return & state -> tp_weaklist ;
227
+ return _PyStaticType_GET_WEAKREFS_LISTPTR ( state ) ;
228
228
}
229
229
Py_ssize_t offset = Py_TYPE (op )-> tp_weaklistoffset ;
230
230
return (PyObject * * )((char * )op + offset );
Original file line number Diff line number Diff line change @@ -52,6 +52,13 @@ typedef struct {
52
52
PyObject * tp_weaklist ;
53
53
} static_builtin_state ;
54
54
55
+ static inline PyObject * *
56
+ _PyStaticType_GET_WEAKREFS_LISTPTR (static_builtin_state * state )
57
+ {
58
+ assert (state != NULL );
59
+ return & state -> tp_weaklist ;
60
+ }
61
+
55
62
struct types_state {
56
63
struct type_cache type_cache ;
57
64
size_t num_builtins_initialized ;
You can’t perform that action at this time.
0 commit comments