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 mark.dickinson
Recipients Devin Jeanpierre, mark.dickinson, serhiy.storchaka, skrah, vstinner
Date 2013-05-12.17:48:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368380928.98.0.504161803677.issue17870@psf.upfronthosting.co.za>
In-reply-to
Content
Some comments for the first patch (I haven't really looked at the second):

- I would much prefer PyLong_AsIntMax_t not to use nb_int;  it should work only for instances of 'int' (just as PyLong_AsSsize_t and PyLong_AsSize_t currently do).

- There's a missing 'versionadded' for PyLong_AsIntMax_t in the docs.

- Will AC_CHECK_SIZEOF(intmax_t) work on platforms that don't define intmax_t?  I don't know whether the #define created by the earlier AC_TYPE_INTMAX_T is available at that point.  We'll probably find out from the buildbots.

- Do we also need an addition to PC/pyconfig.h to define (u)intmax_t and SIZEOF_(U)INTMAX_T on Windows?

- For the PyLong_As* functions, it may be more efficient to code the conversion directly instead of using _PyLong_AsByteArray.

- The PyLong_As* functions assume that intmax_t and uintmax_t have no padding bits, no trap representation, and (in the case of intmax_t) use two's complement.  I think it's fine to assume all these things, but we should also either document or test those assumptions.

- The patch lacks tests.
History
Date User Action Args
2013-05-12 17:48:49mark.dickinsonsetrecipients: + mark.dickinson, vstinner, Devin Jeanpierre, skrah, serhiy.storchaka
2013-05-12 17:48:48mark.dickinsonsetmessageid: <1368380928.98.0.504161803677.issue17870@psf.upfronthosting.co.za>
2013-05-12 17:48:48mark.dickinsonlinkissue17870 messages
2013-05-12 17:48:48mark.dickinsoncreate