Bugs item #1546052, was opened at 2006-08-24 15:38
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1546052&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Christian Walther (cwalther)
Assigned to: Nobody/Anonymous (nobody)
Summary: PyString_FromString() clarification

Initial Comment:
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."

----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2006-09-30 12:04

Message:
Logged In: YES 
user_id=849994

Thanks for the suggestion! Added clarification in rev.
52078, 52079 (2.5).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1546052&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to