GNOME Bugzilla – Bug 442652
Python int should be mapped to GValue long (?)
Last modified: 2008-06-28 10:50:49 UTC
The following code fails on a 64 bit machine. __gproperties__ = { 'size' : (int, None, None, 0, sys.maxint, STANDARD_SIZE, gobject.PARAM_READWRITE) } The error is: "/home/ryan/srctrees/sugar-jhbuild/build/lib/python2.4/site-packages/sugar/graphics/iconbutton.py", line 34, in ? class IconButton(CanvasIcon, hippo.CanvasItem): File "/home/ryan/srctrees/sugar-jhbuild/build/lib/python2.4/site-packages/gtk-2.0/gobject/__init__.py", line 37, in __init__ cls._type_register(cls.__dict__) File "/home/ryan/srctrees/sugar-jhbuild/build/lib/python2.4/site-packages/gtk-2.0/gobject/__init__.py", line 49, in _type_register type_register(cls, namespace.get('__gtype_name__')) OverflowError: signed integer is greater than maximum (while registering property 'size' for GType 'SugarIconButton') Afaict in pyg_type_from_object we are mapping python int to GValue int. Since python integers are implemented using long in C, I'd have expected them to be mapped to GValue long. I might be missing something, please enlighten me :)
I am the test case :)
Duplicate of bug 388216 ?
Yes, I'd say bug 388216 and this bug share the same underlying problem.
*** This bug has been marked as a duplicate of 388216 ***