[pypy-svn] r73962 - pypy/branch/cpython-extension/pypy/module/cpyext

afa at codespeak.net afa at codespeak.net
Thu Apr 22 13:00:33 CEST 2010


Author: afa
Date: Thu Apr 22 13:00:31 2010
New Revision: 73962

Modified:
   pypy/branch/cpython-extension/pypy/module/cpyext/pyobject.py
Log:
Add _Py_NewReference. Not sure what it is used for.


Modified: pypy/branch/cpython-extension/pypy/module/cpyext/pyobject.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/pyobject.py	(original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/pyobject.py	Thu Apr 22 13:00:31 2010
@@ -277,6 +277,10 @@
     if DEBUG_REFCOUNT:
         debug_refcount("INCREF", obj, obj.c_ob_refcnt, frame_stackdepth=3)
 
+ at cpython_api([PyObject], lltype.Void)
+def _Py_NewReference(space, obj):
+    obj.c_ob_refcnt = 1
+
 def _Py_Dealloc(space, obj):
     from pypy.module.cpyext.api import generic_cpy_call_dont_decref
     pto = obj.c_ob_type



More information about the Pypy-commit mailing list