Author: Devin Jeanpierre <jeanpierr...@gmail.com> Branch: Changeset: r82010:f1c5a5f9e0b8 Date: 2016-01-31 02:58 -0800 http://bitbucket.org/pypy/pypy/changeset/f1c5a5f9e0b8/
Log: Cast to PyObject* in PyString_GET_SIZE/AS_STRING. This way we accept PyStringObject*, much like CPython casts to PyStringObject* in order to accept PyObject*. diff --git a/pypy/module/cpyext/include/stringobject.h b/pypy/module/cpyext/include/stringobject.h --- a/pypy/module/cpyext/include/stringobject.h +++ b/pypy/module/cpyext/include/stringobject.h @@ -7,8 +7,8 @@ extern "C" { #endif -#define PyString_GET_SIZE(op) PyString_Size(op) -#define PyString_AS_STRING(op) PyString_AsString(op) +#define PyString_GET_SIZE(op) PyString_Size((PyObject*)(op)) +#define PyString_AS_STRING(op) PyString_AsString((PyObject*)(op)) typedef struct { PyObject_HEAD _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit