My first Python extension

Kragen Sitaker kragen at dnaco.net
Fri Mar 24 18:01:01 CET 2000


In article <3isA4.2277$74.33144 at newsc.telia.net>,
Fredrik Lundh <effbot at telia.com> wrote:
>in this case, it's more efficient to create the Python
>string first, and then fill it with data:
>    outstring = PyString_AS_STRING(str);
>
>    /* outstring now points to the character buffer */

Thanks!

It's not clear from api/stringObjects.html that outstring now points to
the character buffer.  Is this behavior documented somewhere?

(By the way, I'm quite impressed both with the ease of extending Python
and the quality of the documentation.)
-- 
<kragen at pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
The power didn't go out on 2000-01-01 either.  :)



More information about the Python-list mailing list