bug report: inconsistent use of PyUnicode_FromString and PyString_FromString "5.3. Pure Embedding"
Hello, I was just perusing the Python docs, reading about extending Python with C. I found a minor typo at http://docs.python.org/dev/extending/embedding.html#pure-embedding Line 16 of the code sample is: pName = PyUnicode_FromString(argv[1]); But later on in the section, after the code sample, it shows a snippet of this code, but instead uses a different C function: pName = PyString_FromString(argv[1]); I'm not sure if PyUnicode_FromString() is correct or PyString_FromString() is correct, or if it doesn't matter at all. But whatever the choice, these should probably be made to be the same. I am emailing this address as documented at http://docs.python.org/dev/bugs.html Thanks! --Denver
On 22.06.2012 08:04, Denver Coneybeare wrote:
Hello,
I was just perusing the Python docs, reading about extending Python with C. I found a minor typo at
http://docs.python.org/dev/extending/embedding.html#pure-embedding
Line 16 of the code sample is:
pName = PyUnicode_FromString(argv[1]);
But later on in the section, after the code sample, it shows a snippet of this code, but instead uses a different C function:
pName = PyString_FromString(argv[1]);
I'm not sure if PyUnicode_FromString() is correct or PyString_FromString() is correct, or if it doesn't matter at all. But whatever the choice, these should probably be made to be the same.
I am emailing this address as documented at http://docs.python.org/dev/bugs.html
Thanks!
Hi Denver, thanks for the report, this is now fixed in our repository. cheers, Georg
participants (2)
-
Denver Coneybeare
-
Georg Brandl