gh-132776: Revert Moving memoryview XIData Code to memoryobject.c (gh-132960)

This is a partial revert of gh-132821.  It resolves the refleak introduced by that PR.
This commit is contained in:
Eric Snow 2025-04-25 10:43:50 -06:00 committed by GitHub
parent 622176513e
commit 2a28b21a51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 284 additions and 339 deletions

View file

@ -14,7 +14,6 @@
#include "pycore_global_objects_fini_generated.h" // _PyStaticObjects_CheckRefcnt()
#include "pycore_initconfig.h" // _PyStatus_OK()
#include "pycore_long.h" // _PyLong_InitTypes()
#include "pycore_memoryobject.h" // _PyMemoryView_InitTypes()
#include "pycore_object.h" // _PyDebug_PrintTotalRefs()
#include "pycore_obmalloc.h" // _PyMem_init_obmalloc()
#include "pycore_optimizer.h" // _Py_Executors_InvalidateAll
@ -755,11 +754,6 @@ pycore_init_types(PyInterpreterState *interp)
return status;
}
status = _PyMemoryView_InitTypes(interp);
if (_PyStatus_EXCEPTION(status)) {
return status;
}
return _PyStatus_OK();
}
@ -1851,7 +1845,6 @@ finalize_interp_types(PyInterpreterState *interp)
_PyTypes_FiniExtTypes(interp);
_PyUnicode_FiniTypes(interp);
_PySys_FiniTypes(interp);
_PyMemoryView_FiniTypes(interp);
_PyXI_FiniTypes(interp);
_PyExc_Fini(interp);
_PyFloat_FiniType(interp);