[Python-Dev] PyArg_ParseTupe(): parse unsigned integer and check for overflow

Serhiy Storchaka storchaka at gmail.com
Sat Jun 29 18:24:11 CEST 2013


29.06.13 18:16, Nadeem Vawda написав(ла):
> I ran into the same problem in the _lzma module. My solution was to
> define a custom converter that does an explicit check before returning
> the value (see
> http://hg.python.org/cpython/file/default/Modules/_lzmamodule.c#l134).

Definitely Argument Clinic should use converters for unsigned integers 
without wraparound by default.




More information about the Python-Dev mailing list