[pypy-commit] cffi default: Python 3 compat

arigo noreply at buildbot.pypy.org
Sun Dec 28 06:29:04 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r1607:689abc6648a5
Date: 2014-12-28 06:29 +0100
http://bitbucket.org/cffi/cffi/changeset/689abc6648a5/

Log:	Python 3 compat

diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
--- a/c/_cffi_backend.c
+++ b/c/_cffi_backend.c
@@ -5166,7 +5166,7 @@
         return NULL;
     }
 
-    if (PyString_Check(x) || PyUnicode_Check(x) ||
+    if (PyBytes_Check(x) || PyText_Check(x) ||
         PyByteArray_Check(x) /* <= this one here for PyPy compatibility */ ) {
         PyErr_SetString(PyExc_TypeError,
                         "from_buffer() cannot return the address of the "


More information about the pypy-commit mailing list