Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Replace the non-existent PyModule_AddObjectRef with PyModule_AddObject
  • Loading branch information
ambv committed Oct 5, 2021
commit f53acff6d50a5838536034e1aac226eccc27e831
4 changes: 3 additions & 1 deletion Modules/_testmultiphase.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,9 @@ PyInit__test_module_state_shared(PyObject *spec)
return NULL;
}

if (PyModule_AddObjectRef(module, "Error", PyExc_Exception) < 0) {
Py_INCREF(PyExc_Exception);
if (PyModule_AddObject(module, "Error", PyExc_Exception) < 0) {
Py_DECREF(PyExc_Exception);
Py_DECREF(module);
return NULL;
}
Expand Down