gh-132775: Use _PyObject_GetXIData (With Fallback) (gh-134440)

This change includes some semi-related refactoring of queues and channels.
This commit is contained in:
Eric Snow 2025-05-22 06:50:06 -06:00 committed by GitHub
parent d706eb9e0f
commit d0eedfa10e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 485 additions and 437 deletions

View file

@ -1839,6 +1839,7 @@ _sharednsitem_set_value(_PyXI_namespace_item *item, PyObject *value)
return -1;
}
PyThreadState *tstate = PyThreadState_Get();
// XXX Use _PyObject_GetXIDataWithFallback()?
if (_PyObject_GetXIDataNoFallback(tstate, value, item->xidata) != 0) {
PyMem_RawFree(item->xidata);
item->xidata = NULL;