Extention String returning

Jp Calderone exarkun at divmod.com
Mon Oct 24 20:49:14 CEST 2005

On 24 Oct 2005 11:28:23 -0700, Tuvas <tuvas21 at gmail.com> wrote:
>I have been writing a program that is designed to return an 8 byte
>string from C to Python. Occasionally one or more of these bytes will
>be null, but the size of it will always be known. How can I write an
>extention module that will return the correct bytes, and not just until
>the null? I would think there would be a fairly  easy way to do this,
>but, well... Thanks!

Use PyString_FromStringAndSize instead of PyString_FromString.


More information about the Python-list mailing list