Character strings / Python 3.0 C API

rch.astra at googlemail.com rch.astra at googlemail.com
Thu Apr 9 00:08:59 CEST 2009


Thank you very much for your help Martin, now I got it.

Cheers,

RC

On 9 abr, 00:05, "Martin v. Löwis" <mar... at v.loewis.de> wrote:
> > The issue is that all PyUnicode* functions are returning PyObjects.
> > PyString_AsString return value was char*. Is there any real equivalent
> > of this function?
>
> Ah, right. PyString_AsUTF8String returns a bytes object, to which you
> need to apply PyBytes_AsString to. At the end, you need to decref the
> bytes object.
>
> Regards,
> Martin




More information about the Python-list mailing list