File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1825,6 +1825,11 @@ _PyTypes_InitState(PyInterpreterState *interp)
18251825}
18261826
18271827
1828+
1829+ #ifdef MS_WINDOWS
1830+ extern PyTypeObject PyHKEY_Type ;
1831+ #endif
1832+
18281833static PyTypeObject * static_types [] = {
18291834 // The two most important base types: must be initialized first and
18301835 // deallocated last.
@@ -1869,6 +1874,9 @@ static PyTypeObject* static_types[] = {
18691874 & PyFunction_Type ,
18701875 & PyGen_Type ,
18711876 & PyGetSetDescr_Type ,
1877+ #ifdef MS_WINDOWS
1878+ & PyHKEY_Type ,
1879+ #endif
18721880 & PyInstanceMethod_Type ,
18731881 & PyListIter_Type ,
18741882 & PyListRevIter_Type ,
Original file line number Diff line number Diff line change @@ -2046,11 +2046,9 @@ PyMODINIT_FUNC PyInit_winreg(void)
20462046 PyHKEY_Type .tp_doc = PyHKEY_doc ;
20472047 if (PyType_Ready (& PyHKEY_Type ) < 0 )
20482048 return NULL ;
2049- Py_INCREF (& PyHKEY_Type );
20502049 if (PyDict_SetItemString (d , "HKEYType" ,
20512050 (PyObject * )& PyHKEY_Type ) != 0 )
20522051 return NULL ;
2053- Py_INCREF (PyExc_OSError );
20542052 if (PyDict_SetItemString (d , "error" ,
20552053 PyExc_OSError ) != 0 )
20562054 return NULL ;
@@ -2116,5 +2114,3 @@ PyMODINIT_FUNC PyInit_winreg(void)
21162114 ADD_INT (REG_RESOURCE_REQUIREMENTS_LIST );
21172115 return m ;
21182116}
2119-
2120-
You can’t perform that action at this time.
0 commit comments