Commits

Alex Gaynor  committed ebaaa7a

these increfs don't help

  • Participants
  • Parent commits 15ace9b
  • Branches performance cleanup

Comments (0)

Files changed (1)

File c/_cffi_backend.c

     }
     res = PyDict_GetItem(self->l_property_defines, attr);
     if (res != NULL) {
+        Py_INCREF(res);
         PyObject *getter = PyTuple_GetItem(res, 0);
         Py_INCREF(getter);
         res = PyObject_CallFunctionObjArgs(getter, self);
 {
     PyObject *res = PyDict_GetItem(self->l_property_defines, attr);
     if (res != NULL) {
+        Py_INCREF(res);
         PyObject *setter = PyTuple_GetItem(res, 1);
         Py_INCREF(setter);
         res = PyObject_CallFunctionObjArgs(setter, self, value);
         if (res == NULL)
             return -1;
+        Py_DECREF(res);
         return 0;
     }
     return PyObject_GenericSetAttr(self, attr, value);