File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 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)
18671867
18681868 /* Add some symbolic constants to the module */
18691869
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 ) {
18731871 return -1 ;
18741872 }
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 ) {
18781875 return -1 ;
18791876 }
18801877
1881- Py_INCREF (state -> xml_parse_type );
1882- if (PyModule_AddObject (mod , "XMLParserType" ,
1878+ if (PyModule_AddObjectRef (mod , "XMLParserType" ,
18831879 (PyObject * ) state -> xml_parse_type ) < 0 ) {
1884- Py_DECREF (state -> xml_parse_type );
18851880 return -1 ;
18861881 }
18871882
You can’t perform that action at this time.
0 commit comments