[pypy-commit] pypy default: Issue1277: fix signature of PyCode_GetNumFree().

amauryfa noreply at buildbot.pypy.org
Thu Oct 4 21:03:36 CEST 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: 
Changeset: r57784:bdee7a1c7e4c
Date: 2012-10-04 19:06 +0200
http://bitbucket.org/pypy/pypy/changeset/bdee7a1c7e4c/

Log:	Issue1277: fix signature of PyCode_GetNumFree().

diff --git a/pypy/module/cpyext/funcobject.py b/pypy/module/cpyext/funcobject.py
--- a/pypy/module/cpyext/funcobject.py
+++ b/pypy/module/cpyext/funcobject.py
@@ -1,6 +1,6 @@
 from pypy.rpython.lltypesystem import rffi, lltype
 from pypy.module.cpyext.api import (
-    PyObjectFields, generic_cpy_call, CONST_STRING, CANNOT_FAIL,
+    PyObjectFields, generic_cpy_call, CONST_STRING, CANNOT_FAIL, Py_ssize_t,
     cpython_api, bootstrap_function, cpython_struct, build_type_checkers)
 from pypy.module.cpyext.pyobject import (
     PyObject, make_ref, from_ref, Py_DecRef, make_typedescr, borrow_from)
@@ -168,7 +168,7 @@
                              freevars=[],
                              cellvars=[]))
 
- at cpython_api([PyObject], rffi.INT_real, error=CANNOT_FAIL)
+ at cpython_api([PyCodeObject], Py_ssize_t, error=CANNOT_FAIL)
 def PyCode_GetNumFree(space, w_co):
     """Return the number of free variables in co."""
     co = space.interp_w(PyCode, w_co)


More information about the pypy-commit mailing list