File tree 2 files changed +8
-4
lines changed
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)
1825
1825
}
1826
1826
1827
1827
1828
+
1829
+ #ifdef MS_WINDOWS
1830
+ extern PyTypeObject PyHKEY_Type ;
1831
+ #endif
1832
+
1828
1833
static PyTypeObject * static_types [] = {
1829
1834
// The two most important base types: must be initialized first and
1830
1835
// deallocated last.
@@ -1869,6 +1874,9 @@ static PyTypeObject* static_types[] = {
1869
1874
& PyFunction_Type ,
1870
1875
& PyGen_Type ,
1871
1876
& PyGetSetDescr_Type ,
1877
+ #ifdef MS_WINDOWS
1878
+ & PyHKEY_Type ,
1879
+ #endif
1872
1880
& PyInstanceMethod_Type ,
1873
1881
& PyListIter_Type ,
1874
1882
& PyListRevIter_Type ,
Original file line number Diff line number Diff line change @@ -2046,11 +2046,9 @@ PyMODINIT_FUNC PyInit_winreg(void)
2046
2046
PyHKEY_Type .tp_doc = PyHKEY_doc ;
2047
2047
if (PyType_Ready (& PyHKEY_Type ) < 0 )
2048
2048
return NULL ;
2049
- Py_INCREF (& PyHKEY_Type );
2050
2049
if (PyDict_SetItemString (d , "HKEYType" ,
2051
2050
(PyObject * )& PyHKEY_Type ) != 0 )
2052
2051
return NULL ;
2053
- Py_INCREF (PyExc_OSError );
2054
2052
if (PyDict_SetItemString (d , "error" ,
2055
2053
PyExc_OSError ) != 0 )
2056
2054
return NULL ;
@@ -2116,5 +2114,3 @@ PyMODINIT_FUNC PyInit_winreg(void)
2116
2114
ADD_INT (REG_RESOURCE_REQUIREMENTS_LIST );
2117
2115
return m ;
2118
2116
}
2119
-
2120
-
You can’t perform that action at this time.
0 commit comments