summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/bltinmodule.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 47e8c8f..e453fdd 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -163,10 +163,8 @@ builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds)
cls = PyEval_CallObjectWithKeywords(meta, margs, mkw);
Py_DECREF(margs);
}
- if (cls != NULL && PyCell_Check(cell)) {
- Py_INCREF(cls);
- PyCell_SET(cell, cls);
- }
+ if (cls != NULL && PyCell_Check(cell))
+ PyCell_Set(cell, cls);
Py_DECREF(cell);
}
Py_DECREF(ns);