Using PyString_AsString? Very Simple.
Fred L. Drake, Jr.
fdrake at acm.org
Mon Jan 10 13:13:28 EST 2000
Arinte writes:
> Should I delete the char* that I get from PyString_AsString()??? Don't
> readily see this in docs.
I've already made changes so that the next documentation release
will be clear about this.
The return values of PyString_AsString() and PyString_AS_STRING()
should *never* be freed or written to (outside of string creation);
they point to internal data which is actually part of the string
object.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
Corporation for National Research Initiatives
More information about the Python-list
mailing list