mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
gh-132776: Cleanup for XIBufferViewType (gh-132821)
* add notes * rename XIBufferViewObject to xibufferview * move memoryview XIData code to memoryobject.c
This commit is contained in:
parent
c9f3f5b4ed
commit
e54e828852
8 changed files with 339 additions and 250 deletions
|
|
@ -174,6 +174,7 @@ _lookup_getdata_from_registry(dlcontext_t *ctx, PyObject *obj)
|
|||
PyTypeObject *cls = Py_TYPE(obj);
|
||||
|
||||
dlregistry_t *xidregistry = _get_xidregistry_for_type(ctx, cls);
|
||||
assert(xidregistry->initialized);
|
||||
_xidregistry_lock(xidregistry);
|
||||
|
||||
dlregitem_t *matched = _xidregistry_find_type(xidregistry, cls);
|
||||
|
|
@ -190,6 +191,7 @@ static int
|
|||
_xidregistry_add_type(dlregistry_t *xidregistry,
|
||||
PyTypeObject *cls, xidatafunc getdata)
|
||||
{
|
||||
assert(xidregistry->initialized);
|
||||
dlregitem_t *newhead = PyMem_RawMalloc(sizeof(dlregitem_t));
|
||||
if (newhead == NULL) {
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue