
Nov. 28, 2002
1:32 a.m.
Guido van Rossum <guido@python.org> writes:
But in Mark's case (and in many other cases) there will be no problem in the future -- in Python 2.4, his C code will happily accept the positive Python longs that 0x80000000 and others will be then.
Can you please explain how this will happen? If you do int x; PyArg_ParseTuple(args,"i",&x); and args is (0x80000000,), what will be the value of x?
BTW, this reminds me that I've long promised a set of new format codes for PyArg_ParseTuple() to specify taking the lower N bits (for N in 8, 16, 32, 64) and throwing the rest away, without range checks.
Wouldn't Mark have to use these format codes? Regards, Martin