cpython
cpython copied to clipboard
gh-117142: Port _ctypes to multi-phase init
An attempt to introduce multi-phase initialization:
-
Keep using a global state.
-
Integrate
CDataType_*functions intoCType_Type_*(). -
Make
module_traverse()visit almost all global variables to invokemodule_clear(), leaving asidemalloc_closure.c (free_list)for now. Thefree_listis related toCThunkObject_dealloc()and I'm not sure if it also needs isolation.
@encukou @erlend-aasland @aisk
- Issue: gh-117142