Author cwalther
Recipients
Date 2006-08-24.15:38:32
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The documentation for PyObject* PyString_FromString(
const char *v) in the "Python/C API Reference Manual,
29 March 2006, Release 2.4.3", section 7.3.1 "String
Objects"
<http://docs.python.org/api/stringObjects.html>, does
not mention whether this function makes a copy of the
passed C string or just keeps the pointer.

Google provides some posts on various mailing lists and
forums that seem to indicate that it indeed does copy
the string (which is the right thing to do, of course).

Could something like to following be added to the
documentation?

"This function makes a copy of the string pointed to by
v, so you may modify or deallocate it afterwards
without affecting the Python object created by this
function."
History
Date User Action Args
2007-08-23 14:42:21adminlinkissue1546052 messages
2007-08-23 14:42:21admincreate