<div class="gmail_quote">2012/4/20 Armin Rigo <span dir="ltr"><<a href="mailto:arigo@tunes.org">arigo@tunes.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sat, Apr 14, 2012 at 18:44, Stefan Behnel <<a href="mailto:stefan_ml@behnel.de">stefan_ml@behnel.de</a>> wrote:<br>
> PEP393 (the new Unicode type in Py3.3) defines a rather useful C interface<br>
> towards the characters of a Unicode string. I think it would be cool if<br>
> cpyext provided that, so that access to single characters won't require<br>
> copying the unicode buffer into C space anymore.<br>
<br>
</div>FWIW, if it makes sense, you can add PyPy-specific API functions not<br>
in the standard CPython C API, too. I'm thinking about accessing<br>
*string* characters, for example.</blockquote><div><br></div><div>But is it desirable? The first call to PyUnicode_AsUnicode will allocate and copy the unicode buffer,</div><div>but subsequent calls will quickly return the same address.</div>
</div><div><br></div>-- <br>Amaury Forgeot d'Arc<br>