[pypy-issue] [issue1120] [cpyext] missing PyUnicode_Count() and other PyUnicode_*() functions

Amaury Forgeot d Arc tracker at bugs.pypy.org
Wed Apr 11 10:47:36 CEST 2012

Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:

> the "sep" argument to PyUnicode_Split() can be NULL

Oops, I overlooked this!
I'll try to fix it tonight.

> w_sep == lltype.nullptr(PyObject.TO)
This won't work: a w_obj is not a PyObject!
The NULL pointer is already converted to RPython None (which the C translator will write 
as a (pypy_object0*)NULL value...)
Maybe something like this will work:
    if w_sep is None:
        w_sep = space.w_None

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list