2012/4/20 Armin Rigo <[email protected]>

> On Sat, Apr 14, 2012 at 18:44, Stefan Behnel <[email protected]> wrote:
> > PEP393 (the new Unicode type in Py3.3) defines a rather useful C
> interface
> > towards the characters of a Unicode string. I think it would be cool if
> > cpyext provided that, so that access to single characters won't require
> > copying the unicode buffer into C space anymore.
>
> FWIW, if it makes sense, you can add PyPy-specific API functions not
> in the standard CPython C API, too.  I'm thinking about accessing
> *string* characters, for example.


But is it desirable? The first call to PyUnicode_AsUnicode will allocate
and copy the unicode buffer,
but subsequent calls will quickly return the same address.

-- 
Amaury Forgeot d'Arc
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to