File tree 1 file changed +4
-9
lines changed
1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -1867,21 +1867,16 @@ pyexpat_exec(PyObject *mod)
1867
1867
1868
1868
/* Add some symbolic constants to the module */
1869
1869
1870
- Py_INCREF (state -> error );
1871
- if (PyModule_AddObject (mod , "error" , state -> error ) < 0 ) {
1872
- Py_DECREF (state -> error );
1870
+ if (PyModule_AddObjectRef (mod , "error" , state -> error ) < 0 ) {
1873
1871
return -1 ;
1874
1872
}
1875
- Py_INCREF (state -> error );
1876
- if (PyModule_AddObject (mod , "ExpatError" , state -> error ) < 0 ) {
1877
- Py_DECREF (state -> error );
1873
+
1874
+ if (PyModule_AddObjectRef (mod , "ExpatError" , state -> error ) < 0 ) {
1878
1875
return -1 ;
1879
1876
}
1880
1877
1881
- Py_INCREF (state -> xml_parse_type );
1882
- if (PyModule_AddObject (mod , "XMLParserType" ,
1878
+ if (PyModule_AddObjectRef (mod , "XMLParserType" ,
1883
1879
(PyObject * ) state -> xml_parse_type ) < 0 ) {
1884
- Py_DECREF (state -> xml_parse_type );
1885
1880
return -1 ;
1886
1881
}
1887
1882
You can’t perform that action at this time.
0 commit comments