>> Sure. However, you could also use _testcapi.PY_SSIZE_T_MAX, or >> ctypes.sizeof(ctypes.py_object). > > Much less intuitive though.
Actually, I find the ctypes version a more direct answer to the question "what is the address space?". >> I'd be in favor of the latter. I never meant the PyInt_CheckExact hack >> to persist into the release. > > OK. What's needed? The remaining occurrences of PyInt_CheckExact must be replaced with PyLong_Check, and the subsequent PyLong_AsLong calls must check for overflow. There are 22 uses still left. The ones in ceval.c are quite tricky: it's not clear that the speed-up they originally meant to provide is still present. The options would be to either continue special-casing small integers, or to remove the check altogether, trusting that the binary operator is fast enough (which may actually involve fewer function calls than the "inline" version). Regards, Martin _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com