STINNER Victor added the comment: Updated patch (version 3), addressing last issues of Mark's review:
- add a simple unit test in _testcapi: check that PyLong_AsIntMax_t(INTMAX_INT - 1), PyLong_AsIntMax_t(INTMAX_MAX + 1) and PyLong_AsUintMax_t(UINTMAX_MAX + 1) fail with OverflowError - rely on stdint.h on Windows, with a fallback on __int64 for Visual Studio 2008 - PyLong_AsIntMax_t() and PyLong_AsUintMax_t() compute directly the result (rather than calling _PyLong_AsByteArray) I give you one or two days for a last review, and then I'm going to commit the new functions. ---------- Added file: http://bugs.python.org/file30745/intmax_t-3.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17870> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com