8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent deddeb5 commit efed1d1Copy full SHA for efed1d1
Objects/tupleobject.c
@@ -98,7 +98,7 @@ tuple_alloc(Py_ssize_t size)
98
static inline PyObject *
99
tuple_get_empty(void)
100
{
101
- return (PyObject *)&_Py_SINGLETON(tuple_empty);
+ return _Py_NewRef((PyObject *)&_Py_SINGLETON(tuple_empty));
102
}
103
104
@@ -223,7 +223,7 @@ static void
223
tupledealloc(PyTupleObject *op)
224
225
/* The empty tuple is statically allocated. */
226
- if ((PyObject *)op == tuple_get_empty()) {
+ if (op == &_Py_SINGLETON(tuple_empty)) {
227
return;
228
229
Py_ssize_t len = Py_SIZE(op);
0 commit comments