GNOME Bugzilla – Bug 602762
[girepository] Remove some unportable integral type size assumptions
Last modified: 2015-02-07 16:52:51 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 on attachment 148340 [details] [review] Remove some unportable integral type size assumptions This looks good, thanks for taking the time and doing this cleanup.
The following fix has been pushed: ad0aeac Remove some unportable integral type size assumptions
Created attachment 148900 [details] [review] Remove some unportable integral type size assumptions
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]