1. pygame
  2. pygame
  3. pygame

Source

pygame / src / surflock.c

Diff from to

File src/surflock.c

  • Ignore whitespace
         return 0;
     }
     PyList_Append (surf->locklist, ref);
+    Py_DECREF (ref);
 
     if (surf->subsurface)
         PySurface_Prep (surfobj);
     c_api[5] = PySurface_LockBy;
     c_api[6] = PySurface_UnlockBy;
     c_api[7] = PySurface_LockLifetime;
-    apiobj = PyCObject_FromVoidPtr (c_api, NULL);
+    apiobj = encapsulate_api (c_api, "surflock");
     if (apiobj == NULL) {
         DECREF_MOD (module);
         MODINIT_ERROR;