BitMask32 -- Long int too large to convert to int

Hi All,

I’ve been noticing a little glitch in that triggers a type
conversion error.

… /SceneEditor /", Line 457, in collideWithWidget
File “BitMask32”, line 254, in setWord
OverflowError: long Int too large to convert to int

Found this while I was patching up my copy of 1.0.3 that I built with
ppremake and it still occurs in 1.0.5 built with makepanda. I was hoping
that the new build would fix it.

If anyone else is getting this, I think you’ll see the same thing in

Maybe this is a Python 2.4 - GCC thing. But I noticed a guy had to change
BitMask32 stuff on Visual C back in May to stop warnings. Thats in topic…

As a temporary workaround, I simply changed the bitmask to (0x023C49F0)
to give it an arbitrary smaller number to work with and this fixes the

Any Ideas?



BTW: 0x023C49F0 is “my age” * “my shoe size” * “my postal zip code” in hex.

This is indeed a Python 2.4 thing. This is one of the little things that we have already fixed in the CVS trunk, and it will be released along with our official support of Python 2.4.


Thanks David,

So is support for python2.4 a long way off? Just curious.


No; in fact, there are just a handful of little things like this, which are already fixed. We are using Python 2.4 within Disney now. This will all be part of the next major release of Panda.


Oh, and let me suggest an alternate workaround to your hack. Instead of:




This sets the intended bit without having to pass a large unsigned integer.