[pypy-commit] pypy cpyext-test-A: ifdef-out a weird tp_basicsize test in CPython.

devin.jeanpierre pypy.commits at gmail.com
Sun May 1 02:32:53 EDT 2016


Author: Devin Jeanpierre <jeanpierreda at gmail.com>
Branch: cpyext-test-A
Changeset: r84083:a80c3c091bfa
Date: 2016-04-30 23:31 -0700
http://bitbucket.org/pypy/pypy/changeset/a80c3c091bfa/

Log:	ifdef-out a weird tp_basicsize test in CPython.

diff --git a/pypy/module/cpyext/test/test_unicodeobject.py b/pypy/module/cpyext/test/test_unicodeobject.py
--- a/pypy/module/cpyext/test/test_unicodeobject.py
+++ b/pypy/module/cpyext/test/test_unicodeobject.py
@@ -24,8 +24,11 @@
                  if(PyUnicode_GetSize(s) != 11) {
                      result = -PyUnicode_GetSize(s);
                  }
+#ifdef PYPY_VERSION
+                 // Slightly silly test that tp_basicsize is reasonable.
                  if(s->ob_type->tp_basicsize != sizeof(void*)*7)
                      result = s->ob_type->tp_basicsize;
+#endif  // PYPY_VERSION
                  Py_DECREF(s);
                  return PyLong_FromLong(result);
              """),


More information about the pypy-commit mailing list