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 603355 - Constants not correct on 64-bit archs
Constants not correct on 64-bit archs
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: gobject
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks: 602384
 
 
Reported: 2009-11-30 11:03 UTC by Simon van der Linden
Modified: 2009-11-30 20:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use G_<type>_FORMAT (2.54 KB, patch)
2009-11-30 11:03 UTC, Simon van der Linden
committed Details | Review

Description Simon van der Linden 2009-11-30 11:03:18 UTC
Created attachment 148728 [details] [review]
Use G_<type>_FORMAT

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 1 Tomeu Vizoso 2009-11-30 11:20:18 UTC
This patch works here on 32bit.
Comment 2 Johan (not receiving bugmail) Dahlin 2009-11-30 17:40:58 UTC
Comment on attachment 148728 [details] [review]
Use G_<type>_FORMAT

Okay
Comment 3 Simon van der Linden 2009-11-30 20:12:25 UTC
Review of attachment 148728 [details] [review]:

Committed as 38e89942.