Cleanup: use PyModule_AddObjectRef where appropriate

This commit is contained in:
Campbell Barton
2024-09-26 17:07:06 +10:00
parent 596067ea35
commit 32c6f9bbd0
45 changed files with 184 additions and 338 deletions

View File

@@ -330,8 +330,7 @@ int ContextFunctions_Init(PyObject *module)
if (m == nullptr) {
return -1;
}
Py_INCREF(m);
PyModule_AddObject(module, "ContextFunctions", m);
PyModule_AddObjectRef(module, "ContextFunctions", m);
return 0;
}