[pypy-commit] cffi cffi-1.0: Fixes

arigo noreply at buildbot.pypy.org
Thu Apr 16 15:17:38 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-1.0
Changeset: r1731:90a008af1df4
Date: 2015-04-16 14:41 +0200
http://bitbucket.org/cffi/cffi/changeset/90a008af1df4/

Log:	Fixes

diff --git a/new/ffi_obj.c b/new/ffi_obj.c
--- a/new/ffi_obj.c
+++ b/new/ffi_obj.c
@@ -37,7 +37,7 @@
 
     FFIObject *ffi;
     if (ctx_is_static) {
-        ffi = (FFIObject *)PyObject_New(FFIObject, ffitype);
+        ffi = (FFIObject *)PyObject_GC_New(FFIObject, ffitype);
         /* we don't call PyObject_GC_Track() here: from _cffi_init_module()
            it is not needed, because in this case the ffi object is immortal */
     }
diff --git a/new/lib_obj.c b/new/lib_obj.c
--- a/new/lib_obj.c
+++ b/new/lib_obj.c
@@ -185,6 +185,7 @@
     if (GlobSupport_Check(x)) {
         return read_global_var((GlobSupportObject *)x);
     }
+    Py_INCREF(x);
     return x;
 }
 


More information about the pypy-commit mailing list