We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d4f65f commit a0688ebCopy full SHA for a0688eb
src_c/surface.c
@@ -4623,8 +4623,7 @@ exec_surface(PyObject *module)
4623
c_api[2] = pgSurface_Blit;
4624
c_api[3] = pgSurface_SetSurface;
4625
apiobj = encapsulate_api(c_api, "surface");
4626
- if (PyModule_AddObjectRef(module, PYGAMEAPI_LOCAL_ENTRY, apiobj)) {
4627
- Py_XDECREF(apiobj);
+ if (PyModule_Add(module, PYGAMEAPI_LOCAL_ENTRY, apiobj) < 0) {
4628
return -1;
4629
}
4630
0 commit comments