From: Marcelo M. <mm...@ac...> - 2005-12-13 21:17:13
|
Other solution, when calling in python, this could work too foo(int(value_too_large)) marcelo Robert Jones wrote: > I am using Swig to wrap a C API to some hardware into Python, and > at some point the C API gives a handle to resources which is of a type > ultimately typedef'd to an unsigned int. Later, when I pass the value > back to the > C API I have to a pass it in a value which is ultimately typedef'd > to a signed int. There are of coourse some values which are too > large to pass in a signed int, but fine to pass in an unsigned int, and > when I use one of these values Swig quite rightly barfs, saying the > value is too large. > > Can I break swig's type system a bit, maybe with a typemap, to > not check the size of the passed signed int parameter? > > Cheers all, Rob. |