Author: Manuel Jacob <m...@manueljacob.de> Branch: py3k Changeset: r82607:088e4a9efe72 Date: 2016-02-29 02:24 +0100 http://bitbucket.org/pypy/pypy/changeset/088e4a9efe72/
Log: Fix C API test. See comment for details. Thanks to Ronan and Armin for discussion and the suggestion to mask out bits. It would also be possible to mask out bits in the Py_REFCNT macro. There is a discussion whether this should be done (also on default). In this case this changeset wouldn't be needed and should be backed out. diff --git a/lib-python/3/test/test_capi.py b/lib-python/3/test/test_capi.py --- a/lib-python/3/test/test_capi.py +++ b/lib-python/3/test/test_capi.py @@ -201,7 +201,10 @@ # Bug #6012 class Test6012(unittest.TestCase): def test(self): - self.assertEqual(_testcapi.argparsing("Hello", "World"), 1) + # PyPy change: Mask out higher bits of reference count. PyPy increases + # the reference count by a high number if the object is linked to a + # PyPy object. + self.assertEqual(_testcapi.argparsing("Hello", "World") & 0xfffffff, 1) class EmbeddingTest(unittest.TestCase): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit