C-API question: Memory returned by PyString_AsString

Christoph Bennemann Ch_Bennemann at web.de
Fri Jul 19 03:49:51 EDT 2002


Hello,

functions like PyString_AsString return a pointer to a character
vector. Is this memory specially allocated when I call this function
(which implies I have to take care of it in my program) or is this
merely a pointer to a character vector stored by the Python
interpreter (implying that I should not free the memory). I assume
that the later is correct, but would like to have a definitive answer.

Thanks in advance,

Christoph

Dr. Christoph Bennemann
d-fine Gmbh
Germany



More information about the Python-list mailing list