Devin Jeanpierre added the comment: > I wrote my first patch in 2013, but I still fail to find a very good example > where intmax_t would be an obvious choice. So I have to agree and I will now > close the issue.
Hold on, nobody ever answered the question in the OP. How would you convert an intptr_t (e.g. Rust's int type) to a Python int? You can't use FromVoidPtr because of signedness. You can use FromLongLong, but that's implementation-defined. If what we should be using is FromLongLong for all "really big ints", why not just rename FromLongLong to FromIntMax and call it a day? There is no standard relationship between long long and most other int types -- all we know is that it's at least 64 bits, but an int type can perfectly reasonably be e.g. 80 bits or 128 bits or similar. I think it *is* a worhtwhile goal to allow programmers to write C code that has as little implementation-defined or undefined behavior as possible. If that isn't considered a worthwhile goal, maybe we should reconsider using such a dangerous and pointy language as C. :) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17870> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com