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 603244 - Add the missing limit constants from glibconfig.h
Add the missing limit constants from glibconfig.h
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks: 602384
 
 
Reported: 2009-11-28 18:47 UTC by Tomeu Vizoso
Modified: 2009-11-30 11:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add the missing limit constants from glibconfig.h (1.85 KB, patch)
2009-11-28 18:47 UTC, Tomeu Vizoso
committed Details | Review
Add the missing limit constants from glibconfig.h (1.85 KB, patch)
2009-11-29 11:31 UTC, Tomeu Vizoso
committed Details | Review
Fix build on 64-bit arch (2.54 KB, patch)
2009-11-29 23:15 UTC, Simon van der Linden
none Details | Review
Fix build on 64-bit archs (2.54 KB, patch)
2009-11-29 23:19 UTC, Simon van der Linden
rejected Details | Review

Description Tomeu Vizoso 2009-11-28 18:47:13 UTC
So automated tests in python can check that the limits are observed.
Comment 1 Tomeu Vizoso 2009-11-28 18:47:15 UTC
Created attachment 148662 [details] [review]
Add the missing limit constants from glibconfig.h
Comment 2 Johan (not receiving bugmail) Dahlin 2009-11-28 22:19:31 UTC
Review of attachment 148662 [details] [review]:

Looks good to me
Comment 3 Johan (not receiving bugmail) Dahlin 2009-11-28 22:19:32 UTC
Review of attachment 148662 [details] [review]:

Looks good to me
Comment 4 Tomeu Vizoso 2009-11-29 11:30:01 UTC
Pushed, thanks for the quick review.
Comment 5 Tomeu Vizoso 2009-11-29 11:31:33 UTC
The following fix has been pushed:
e24d155 Add the missing limit constants from glibconfig.h
Comment 6 Tomeu Vizoso 2009-11-29 11:31:40 UTC
Created attachment 148683 [details] [review]
Add the missing limit constants from glibconfig.h
Comment 7 Simon van der Linden 2009-11-29 23:15:58 UTC
Created attachment 148709 [details] [review]
Fix build on 64-bit arch

It doesn't build fine on 64-bit archs:

`generate-constants.c
generate-constants.c: In function ‘main’:
generate-constants.c:36: warning: format ‘%lld’ expects type ‘long long int’, but argument 2 has type ‘long int’
generate-constants.c:37: warning: format ‘%lld’ expects type ‘long long int’, but argument 2 has type ‘long int’
generate-constants.c:38: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 2 has type ‘long unsigned int’
generate-constants.c:39: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’
generate-constants.c:40: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
generate-constants.c:41: warning: format ‘%lld’ expects type ‘long long int’, but argument 2 has type ‘long int’
generate-constants.c:42: warning: format ‘%lld’ expects type ‘long long int’, but argument 2 has type ‘long int’

And, notably, it produces
G_MAXSIZE = -1
G_MAXSSIZE = -1

This patch uses G_<type>_FORMAT to ensure portability.
Comment 8 Simon van der Linden 2009-11-29 23:19:40 UTC
Created attachment 148710 [details] [review]
Fix build on 64-bit archs

Submitting the same patch again in order to reopen the bug (couldn't find another way to do so); sorry.
Comment 9 Simon van der Linden 2009-11-29 23:20:21 UTC
Didn't work. Yay.
Comment 10 Tomeu Vizoso 2009-11-30 10:52:45 UTC
(In reply to comment #9)
> Didn't work. Yay.

Guess it's better to open a new one? After all, the problem you have found is different from the one that originated this ticket.
Comment 11 Simon van der Linden 2009-11-30 11:04:20 UTC
Review of attachment 148710 [details] [review]:

Moved to bug 603355.