[Python-Dev] new format codes for getargs.c

Thomas Heller theller@python.net
21 Feb 2003 19:54:29 +0100

I've implemented a 'k' format code for getargs.c, and uploaded a patch
for it http://www.python.org/sf/595026.

This code accepts integers or longs, does no range checking, and
returns the lower bits in an unsigned long.

Is this also the fix for the hex constant issue which has been
discussed here before?  Are extension writers supposed to replace 'i'
with 'k' in the PyArg_Parse calls in their extensions now?

Then, I'm not sure how to proceed.

Sure, a 'K' format code, which returns a LONG_LONG will also be needed,
and I can implement that.

Are the other changes proposed in the SF item (changes to the 'B',
'H', 'I' codes) needed?

Do I have to add code somewhere to test these format codes or the
Py.._From..Mask functions, probably in testcapi.c?