Skip to content
Snippets Groups Projects
Commit e4b797138936 authored by Victor Stinner's avatar Victor Stinner
Browse files

bpo-43770: Refactor PyType_Ready() function (GH-25336)

* Split PyType_Ready() into sub-functions.
* type_ready_mro() now checks if bases are static types earlier.
* Check tp_name earlier, in type_ready_checks().
* Add _PyType_IsReady() macro to check if a type is ready.
parent f23ba7c6f317
No related branches found
No related tags found
No related merge requests found
......@@ -174,6 +174,10 @@
const char *slot_name,
int success);
// PyType_Ready() must be called if _PyType_IsReady() is false.
// See also the Py_TPFLAGS_READY flag.
#define _PyType_IsReady(type) ((type)->tp_dict != NULL)
#ifdef __cplusplus
}
#endif
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment