diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2025-04-24 18:25:29 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-24 18:25:29 -0600 |
commit | e54e8288521c1bd5fa496dfa281d034af20d8f42 (patch) | |
tree | b2bfe83090c980b39c2e1097e3d33b59f33e6c05 /Python/crossinterp_data_lookup.h | |
parent | c9f3f5b4ed52d7bed6073ffa39717ece47202558 (diff) | |
download | cpython-e54e8288521c1bd5fa496dfa281d034af20d8f42.tar.gz cpython-e54e8288521c1bd5fa496dfa281d034af20d8f42.zip |
gh-132776: Cleanup for XIBufferViewType (gh-132821)
* add notes
* rename XIBufferViewObject to xibufferview
* move memoryview XIData code to memoryobject.c
Diffstat (limited to 'Python/crossinterp_data_lookup.h')
-rw-r--r-- | Python/crossinterp_data_lookup.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/crossinterp_data_lookup.h b/Python/crossinterp_data_lookup.h index 48e5d9762cd..6e75e247528 100644 --- a/Python/crossinterp_data_lookup.h +++ b/Python/crossinterp_data_lookup.h @@ -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; |