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 602762 - [girepository] Remove some unportable integral type size assumptions
[girepository] Remove some unportable integral type size assumptions
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-11-23 19:18 UTC by Iain Nicol
Modified: 2015-02-07 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove some unportable integral type size assumptions (2.99 KB, patch)
2009-11-23 19:18 UTC, Iain Nicol
none Details | Review
Remove some unportable integral type size assumptions (3.04 KB, patch)
2009-12-02 12:45 UTC, Johan (not receiving bugmail) Dahlin
committed Details | Review

Description Iain Nicol 2009-11-23 19:18:41 UTC
Created attachment 148340 [details] [review]
Remove some unportable integral type size assumptions

The attached patch does some portability improvements.

The first is that it removes the assumption from gfield.c that sizeof (time_t) == sizeof (long).  This new code is analogous to code in the function g_ir_ffi_get_ffi_type.

The second change is to g_ir_ffi_convert_arguments.  Without this patch, the code does some weird casting and conversions, including the bad assumption that sizeof (size_t) == sizeof (gint32).

Remaining issue: girnode.c assumes that sizeof (size_t) == sizeof (long) == sizeof (time_t) [search for `SSIZE'].  I haven't touched this code, because I don't understand the implications of changing it (it would change the file format?).  However, this issue isn't the end of the world, because the assumption will be valid on must Unix-like systems.
Comment 1 Johan (not receiving bugmail) Dahlin 2009-12-02 12:43:11 UTC
Comment on attachment 148340 [details] [review]
Remove some unportable integral type size assumptions

This looks good, thanks for taking the time and doing this cleanup.
Comment 2 Johan (not receiving bugmail) Dahlin 2009-12-02 12:45:42 UTC
The following fix has been pushed:
ad0aeac Remove some unportable integral type size assumptions
Comment 3 Johan (not receiving bugmail) Dahlin 2009-12-02 12:45:46 UTC
Created attachment 148900 [details] [review]
Remove some unportable integral type size assumptions
Comment 4 André Klapper 2015-02-07 16:52:51 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]