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 688949 - [PATCH] Wrong ranges for TYPE_INT64 and TYPE_UINT64.
[PATCH] Wrong ranges for TYPE_INT64 and TYPE_UINT64.
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: gobject
Git master
Other All
: Normal major
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-23 18:18 UTC by Simonas Kazlauskas
Modified: 2012-11-26 06:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes an issue (1.29 KB, patch)
2012-11-23 18:18 UTC, Simonas Kazlauskas
none Details | Review

Description Simonas Kazlauskas 2012-11-23 18:18:23 UTC
In corner case where people are using values 2 ** 62 < ±x < 2 ** 63 for TYPE_INT64 and 2 ** 63 < x < 2 ** 64 for TYPE_UINT64 they will get warnings even tough values are valid.
Comment 1 Simonas Kazlauskas 2012-11-23 18:18:53 UTC
Created attachment 229738 [details] [review]
Fixes an issue
Comment 2 Martin Pitt 2012-11-26 06:15:10 UTC
Thanks for catching this! It's almost right, the minimum int64 is 2**63, not 2**63 - 1. I updated the test cases as well, as the range check was also broken there:

http://git.gnome.org/browse/pygobject/commit/?id=d16604f64d25d18409270d7537fc993113b65c19

I also cherry-picked this onto the stable 3.4 branch.