[pypy-commit] pypy virtual-arguments: and another one

fijal noreply at buildbot.pypy.org
Thu Jul 19 16:32:17 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: virtual-arguments
Changeset: r56222:657194859ad3
Date: 2012-07-19 16:31 +0200
http://bitbucket.org/pypy/pypy/changeset/657194859ad3/

Log:	and another one

diff --git a/pypy/module/cpyext/tupleobject.py b/pypy/module/cpyext/tupleobject.py
--- a/pypy/module/cpyext/tupleobject.py
+++ b/pypy/module/cpyext/tupleobject.py
@@ -11,6 +11,8 @@
 
 @cpython_api([Py_ssize_t], PyObject)
 def PyTuple_New(space, size):
+    if size < 0:
+        size = 0
     return W_TupleObject([space.w_None] * size)
 
 @cpython_api([PyObject, Py_ssize_t, PyObject], rffi.INT_real, error=-1)


More information about the pypy-commit mailing list