Author: Matti Picus <matti.pi...@gmail.com> Branch: py3k Changeset: r84677:38c238251a5d Date: 2016-05-25 07:42 +0300 http://bitbucket.org/pypy/pypy/changeset/38c238251a5d/
Log: fixes for cpyext tests diff --git a/pypy/module/cpyext/src/unicodeobject.c b/pypy/module/cpyext/src/unicodeobject.c --- a/pypy/module/cpyext/src/unicodeobject.c +++ b/pypy/module/cpyext/src/unicodeobject.c @@ -6,9 +6,6 @@ #define Py_ISDIGIT isdigit #define Py_ISALPHA isalpha -#define PyObject_Malloc malloc -#define PyObject_Free free - static void makefmt(char *fmt, int longflag, int longlongflag, int size_tflag, int zeropad, int width, int precision, char c) diff --git a/pypy/module/cpyext/test/test_version.py b/pypy/module/cpyext/test/test_version.py --- a/pypy/module/cpyext/test/test_version.py +++ b/pypy/module/cpyext/test/test_version.py @@ -33,6 +33,7 @@ PyModule_AddIntConstant(m, "py_micro_version", PY_MICRO_VERSION); return m; } + Py_RETURN_NONE; """ module = self.import_module(name='foo', init=init) assert module.py_version == '%d.%d.%d' % sys.version_info[:3] @@ -49,6 +50,7 @@ PyModule_AddStringConstant(m, "pypy_version", PYPY_VERSION); PyModule_AddIntConstant(m, "pypy_version_num", PYPY_VERSION_NUM); } + Py_RETURN_NONE; """ module = self.import_module(name='foo', init=init) v = sys.pypy_version_info diff --git a/pypy/module/cpyext/unicodeobject.py b/pypy/module/cpyext/unicodeobject.py --- a/pypy/module/cpyext/unicodeobject.py +++ b/pypy/module/cpyext/unicodeobject.py @@ -215,7 +215,7 @@ # PyPy is always ready. return space.w_True -@cpython_api([PyObject], rffi.CWCHARP, error=CANNOT_FAIL) +@cpython_api([rffi.VOIDP], rffi.CWCHARP, error=CANNOT_FAIL) def PyUnicode_AS_UNICODE(space, ref): """Return a pointer to the internal Py_UNICODE buffer of the object. ref has to be a PyUnicodeObject (not checked).""" _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit