@@ -6080,7 +6080,6 @@ _ctypes_add_objects(PyObject *mod)
60806080 } while (0)
60816081
60826082 ctypes_state * st = get_module_state (mod );
6083- MOD_ADD ("_pointer_type_cache" , Py_NewRef (st -> _ctypes_ptrtype_cache ));
60846083
60856084#ifdef MS_WIN32
60866085 MOD_ADD ("COMError" , Py_NewRef (st -> PyComError_Type ));
@@ -6141,11 +6140,6 @@ _ctypes_mod_exec(PyObject *mod)
61416140 return -1 ;
61426141 }
61436142
6144- st -> _ctypes_ptrtype_cache = PyDict_New ();
6145- if (st -> _ctypes_ptrtype_cache == NULL ) {
6146- return -1 ;
6147- }
6148-
61496143 st -> PyExc_ArgError = PyErr_NewException ("ctypes.ArgumentError" , NULL , NULL );
61506144 if (!st -> PyExc_ArgError ) {
61516145 return -1 ;
@@ -6165,7 +6159,6 @@ _ctypes_mod_exec(PyObject *mod)
61656159static int
61666160module_traverse (PyObject * module , visitproc visit , void * arg ) {
61676161 ctypes_state * st = get_module_state (module );
6168- Py_VISIT (st -> _ctypes_ptrtype_cache );
61696162 Py_VISIT (st -> _unpickle );
61706163 Py_VISIT (st -> array_cache );
61716164 Py_VISIT (st -> error_object_name );
@@ -6200,7 +6193,6 @@ module_traverse(PyObject *module, visitproc visit, void *arg) {
62006193static int
62016194module_clear (PyObject * module ) {
62026195 ctypes_state * st = get_module_state (module );
6203- Py_CLEAR (st -> _ctypes_ptrtype_cache );
62046196 Py_CLEAR (st -> _unpickle );
62056197 Py_CLEAR (st -> array_cache );
62066198 Py_CLEAR (st -> error_object_name );
0 commit comments