If you send me a patch (against the boost trunk) I'll test it and check it in. Probably, the file to be changed is boost/libs/python/src/converter/builtin_converters.cpp I'd try working with boost/numeric/conversion/cast.hpp Ralf
----- Original Message ---- From: Anderson Lizardo <anderson.liza...@openbossa.org> To: cplusplus-sig@python.org Sent: Monday, June 15, 2009 12:24:29 PM Subject: [C++-sig] boost.python: no overflow checking for unsigned int parameters ? Hi, I noticed that boost.python silently accepts negative (or too long) integers for constructor/methods that have "unsigned int" parameters. (signed) "int" arguments seem to be handled just fine. Is it possible to tell boost.python to check for overflow and raise an exception just like it happens to int parameters ? BTW, I'm using boost1.38. See test case below (save it as "mymodule.cpp"), "MyClass1" uses int parameters, "MyClass2" uses unsigned int: ### snip ### _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig