[pypy-commit] cffi default: Missing Py_INCREF().
arigo
noreply at buildbot.pypy.org
Sun Jun 17 16:17:02 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r406:5b263c5b416c
Date: 2012-06-17 16:16 +0200
http://bitbucket.org/cffi/cffi/changeset/5b263c5b416c/
Log: Missing Py_INCREF().
diff --git a/c/_ffi_backend.c b/c/_ffi_backend.c
--- a/c/_ffi_backend.c
+++ b/c/_ffi_backend.c
@@ -1092,6 +1092,7 @@
{
CDataObject *obv, *obw;
int equal;
+ PyObject *res;
if (op != Py_EQ && op != Py_NE)
goto Unimplemented;
@@ -1109,11 +1110,14 @@
else
goto Unimplemented;
- return (equal ^ (op == Py_NE)) ? Py_True : Py_False;
+ res = (equal ^ (op == Py_NE)) ? Py_True : Py_False;
+ done:
+ Py_INCREF(res);
+ return res;
Unimplemented:
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
+ res = Py_NotImplemented;
+ goto done;
}
static long cdata_hash(CDataObject *cd)
More information about the pypy-commit
mailing list