This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rfk
Recipients docs@python, rfk
Date 2012-06-04.00:32:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338769973.67.0.784454345332.issue14995@psf.upfronthosting.co.za>
In-reply-to
Content
PyLong_FromString will raise a ValueError if the given string doesn't contain a null byte after the digits.  For example, this will result in a ValueError

   char *pend;
   PyLong_FromString("1234 extra", &pend, 10)

While this will successfully read the number and set the pointer to the extra data:

   char *pend;
   PyLong_FromString("1234\0extra", &pend, 10)

The requirement for a null-terminated string of digits is not clear from the docs.  Suggested re-wording attached.
History
Date User Action Args
2012-06-04 00:32:53rfksetrecipients: + rfk, docs@python
2012-06-04 00:32:53rfksetmessageid: <1338769973.67.0.784454345332.issue14995@psf.upfronthosting.co.za>
2012-06-04 00:32:52rfklinkissue14995 messages
2012-06-04 00:32:52rfkcreate