After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 442652 - Python int should be mapped to GValue long (?)
Python int should be mapped to GValue long (?)
Status: RESOLVED DUPLICATE of bug 388216
Product: pygobject
Classification: Bindings
Component: gobject
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-31 18:18 UTC by Marco Pesenti Gritti
Modified: 2008-06-28 10:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marco Pesenti Gritti 2007-05-31 18:18:36 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 :)
Comment 1 Ryan Pavlik 2007-05-31 19:11:16 UTC
I am the test case :)
Comment 2 Johan (not receiving bugmail) Dahlin 2007-05-31 19:35:37 UTC
Duplicate of bug 388216 ?
Comment 3 Gustavo Carneiro 2007-06-02 13:50:19 UTC
Yes, I'd say bug 388216 and this bug share the same underlying problem.
Comment 4 Björn Lindqvist 2008-06-28 10:50:49 UTC

*** This bug has been marked as a duplicate of 388216 ***