@@ -93,38 +93,6 @@ API.. The module does not create any objects that are shared globally.
9393 PyMem_RawFree(VAR)
9494
9595
96- struct xid_class_registry {
97- size_t count ;
98- #define MAX_XID_CLASSES 5
99- struct {
100- PyTypeObject * cls ;
101- } added [MAX_XID_CLASSES ];
102- };
103-
104- static int
105- register_xid_class (PyTypeObject * cls , crossinterpdatafunc shared ,
106- struct xid_class_registry * classes )
107- {
108- int res = ensure_xid_class (cls , shared );
109- if (res == 0 ) {
110- assert (classes -> count < MAX_XID_CLASSES );
111- // The class has refs elsewhere, so we need to incref here.
112- classes -> added [classes -> count ].cls = cls ;
113- classes -> count += 1 ;
114- }
115- return res ;
116- }
117-
118- static void
119- clear_xid_class_registry (struct xid_class_registry * classes )
120- {
121- while (classes -> count > 0 ) {
122- classes -> count -= 1 ;
123- PyTypeObject * cls = classes -> added [classes -> count ].cls ;
124- _PyCrossInterpreterData_UnregisterClass (cls );
125- }
126- }
127-
12896#define XID_IGNORE_EXC 1
12997#define XID_FREE 2
13098
@@ -247,8 +215,6 @@ wait_for_lock(PyThread_type_lock mutex, PY_TIMEOUT_T timeout)
247215/* module state *************************************************************/
248216
249217typedef struct {
250- struct xid_class_registry xid_classes ;
251-
252218 /* Added at runtime by interpreters module. */
253219 PyTypeObject * send_channel_type ;
254220 PyTypeObject * recv_channel_type ;
@@ -313,8 +279,6 @@ traverse_module_state(module_state *state, visitproc visit, void *arg)
313279static void
314280clear_xid_types (module_state * state )
315281{
316- clear_xid_class_registry (& state -> xid_classes );
317-
318282 /* external types */
319283 if (state -> send_channel_type != NULL ) {
320284 (void )_PyCrossInterpreterData_UnregisterClass (state -> send_channel_type );
0 commit comments