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

afa at codespeak.net afa at codespeak.net
Wed Apr 28 19:52:31 CEST 2010

Author: afa
Date: Wed Apr 28 19:52:30 2010
New Revision: 74196

it's mostly a stub, but the caller I've seen is prepared for it to return NULL
and call getattr/setattr in this case.

Modified: pypy/branch/cpython-extension/pypy/module/cpyext/object.py
--- pypy/branch/cpython-extension/pypy/module/cpyext/object.py	(original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/object.py	Wed Apr 28 19:52:30 2010
@@ -2,7 +2,7 @@
 from pypy.module.cpyext.api import cpython_api, generic_cpy_call, CANNOT_FAIL,\
         Py_ssize_t, PyVarObject, Py_TPFLAGS_HEAPTYPE,\
         Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE, CONST_STRING
-from pypy.module.cpyext.pyobject import PyObject, make_ref, from_ref
+from pypy.module.cpyext.pyobject import PyObject, PyObjectP, make_ref, from_ref
 from pypy.module.cpyext.pyobject import Py_IncRef, Py_DecRef
 from pypy.module.cpyext.state import State
 from pypy.module.cpyext.typeobject import PyTypeObjectPtr, W_PyCTypeObject
@@ -63,6 +63,10 @@
     the fields used by the tp_traverse handler become invalid."""
+ at cpython_api([PyObject], PyObjectP, error=CANNOT_FAIL)
+def _PyObject_GetDictPtr(space, op):
+    return lltype.nullptr(PyObjectP.TO)
 @cpython_api([PyObject], rffi.INT_real, error=-1)
 def PyObject_IsTrue(space, w_obj):
     return space.is_true(w_obj)

More information about the Pypy-commit mailing list