port: advance VC6 typeobject frontier and preserve regression coverage

This commit is contained in:
RayPals
2026-10-26 18:09:33 +00:00
parent 35caf1a558
commit 5ab291a68c
162 changed files with 15675 additions and 85 deletions
@@ -73,10 +73,12 @@ number_init = body_for("_PyDesc_InitTypes(void)")
if "mappingproxy_as_number.nb_or = mappingproxy_or;" not in number_init or "mappingproxy_as_number.nb_inplace_or = mappingproxy_ior;" not in number_init:
raise SystemExit("VC6 mappingproxy slots must be assigned before type readiness")
init_body = body_for("_PyTypes_InitTypes(PyInterpreterState *interp)", object_source)
order = ("_PyClassObject_InitTypes();", "_PyDesc_InitTypes();", "for (size_t i=0;", "PyType_Ready(type)")
order = ("_PyClassObject_InitTypes();", "_PyDesc_InitTypes();", "for (i=0;", "PyType_Ready(type)")
positions = [init_body.index(item) for item in order]
if positions != sorted(positions):
raise SystemExit("legacy static type slots must be initialized before PyType_Ready")
if "size_t i;" not in init_body or "for (size_t i=0;" in init_body:
raise SystemExit("static type initialization loop must use its C89 entry declaration")
body = body_for("PyDescr_NewMethod(PyTypeObject *type, PyMethodDef *method)")
for declaration in ("PyMethodDescrObject *descr;", "vectorcallfunc vectorcall;"):