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

xoraxax at codespeak.net xoraxax at codespeak.net
Wed Apr 7 01:43:22 CEST 2010


Author: xoraxax
Date: Wed Apr  7 01:43:20 2010
New Revision: 73481

Modified:
   pypy/branch/cpython-extension/pypy/module/cpyext/dictobject.py
Log:
Fix annotation cleverness (it was annotated as void).

Modified: pypy/branch/cpython-extension/pypy/module/cpyext/dictobject.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/dictobject.py	(original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/dictobject.py	Wed Apr  7 01:43:20 2010
@@ -57,7 +57,7 @@
     return space.int_w(space.len(w_obj))
 
 @cpython_api([PyObject, Py_ssize_t, PyObjectP, PyObjectP], rffi.INT_real, error=CANNOT_FAIL)
-def PyDict_Next(space, p, ppos, pkey, pvalue):
+def PyDict_Next(space, w_obj, ppos, pkey, pvalue):
     """Iterate over all key-value pairs in the dictionary p.  The
     Py_ssize_t referred to by ppos must be initialized to 0
     prior to the first call to this function to start the iteration; the
@@ -98,6 +98,8 @@
         }
         Py_DECREF(o);
     }"""
+    if w_obj is None:
+        return 0
     raise NotImplementedError
 
 



More information about the Pypy-commit mailing list