Low-level core library that forms the basis for projects such as GTK+ and GNOME.
Go to file
Ray Strode c99df8f34c ffi: Treat enums as 32 bit signed values to fix PPC64
To call a function dynamically using ffi, the caller
first has to tell ffi the size of all the input arguments
of the function. On little endian architectures (like x86_64)
specifying a size that's too large will happen to work because
of how the bits are laid out in memory.  On big endian architectures,
however, specifying the wrong size can lead to reading the wrong
bits.

The function g_type_info_get_ffi_type maps input giargument types to
specific sizes. It was assuming enums were word (pointer) sized; in
fact they can be in theory any size (1,2,4,8 bytes), but in practice
in introspection (via GIArgument) as well as GValue we're limited to 4
byte enums.

This commit fixes PPC64 (big endian, 64 bit).

Signed-off-by: Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=665150
2011-12-21 15:55:18 -05:00
cmph Windows port: cmph_time.h includes sys/resource.h which is not available on Windows. 2011-09-07 21:59:52 +02:00
cmph-bdz-test.c cmph-bdz-test: New test 2010-12-03 16:03:32 -05:00
gdump.c gi-dump-types: New uninstalled debugging program 2011-09-03 12:34:29 -04:00
gi-dump-types.c gi-dump-types: New uninstalled debugging program 2011-09-03 12:34:29 -04:00
giarginfo.c Add Since: for g_arg_info_is_skip() 2011-05-13 14:23:05 -04:00
giarginfo.h Add support for the (skip) annotation on parameters or return values 2011-05-13 14:18:48 -04:00
gibaseinfo.c gibaseinfo: Fix compiler warnings 2011-12-01 10:55:19 -05:00
gibaseinfo.h Box GIBaseInfo structure. 2010-09-15 09:48:44 -03:00
gicallableinfo.c Add support for the (skip) annotation on parameters or return values 2011-05-13 14:18:48 -04:00
gicallableinfo.h Add support for the (skip) annotation on parameters or return values 2011-05-13 14:18:48 -04:00
giconstantinfo.c giconstantinfo: Add API to fix memory leak 2011-10-05 16:46:33 -04:00
giconstantinfo.h giconstantinfo: Add API to fix memory leak 2011-10-05 16:46:33 -04:00
gienuminfo.c Add 'Since:' tags to the newly added GIEnumInfo methods 2011-08-18 22:51:57 +02:00
gienuminfo.h Allow enums and bitfields to have static methods 2011-08-16 18:43:23 +02:00
gifieldinfo.c Deprecate ErrorDomain 2011-08-12 11:10:43 -04:00
gifieldinfo.h [GIRepository] Rename GArgument to GIArgument 2010-08-31 17:35:57 -03:00
gifunctioninfo.c Add g_vfunc_info_invoke and g_vfunc_info_get_address 2011-01-12 20:05:09 +01:00
gifunctioninfo.h [GIRepository] Rename GArgument to GIArgument 2010-08-31 17:35:57 -03:00
giinterfaceinfo.c [GIVInterfaceInfo] Document and check args 2010-06-12 11:14:36 -03:00
giinterfaceinfo.h [girepository] Move the rest out of ginfo.ch 2010-06-06 19:54:53 -03:00
ginvoke.c [gifunctioninfo] Move over invoke function 2010-06-06 13:27:16 -03:00
giobjectinfo.c g_object_info_find_method_using_interfaces: Fix crash if not found 2010-12-06 11:14:53 -05:00
giobjectinfo.h g_object_info_find_method_using_interfaces: New function 2010-12-06 10:09:50 -05:00
gipropertyinfo.c [g_property_info_get_flags] Document properly 2010-06-11 21:06:02 -03:00
gipropertyinfo.h Support the (transfer) annotation for properties. 2010-06-08 17:35:12 +02:00
giregisteredtypeinfo.c Rework how fundamental GObject types are introspected 2011-06-08 17:45:31 +02:00
giregisteredtypeinfo.h Add support for non-GObject fundamental objects 2010-07-09 10:15:45 -03:00
girepository-private.h Add g_vfunc_info_invoke and g_vfunc_info_get_address 2011-01-12 20:05:09 +01:00
girepository.c repository: Fix g_irepository_get_c_prefix() 2011-09-21 14:05:52 -04:00
girepository.h Add g_irepository_find_by_error_domain() 2011-08-12 11:11:45 -04:00
girffi.c ffi: Treat enums as 32 bit signed values to fix PPC64 2011-12-21 15:55:18 -05:00
girffi.h Export gi_type_tag_get_ffi_type 2010-11-09 17:07:26 -05:00
girmodule.c Deprecate ErrorDomain 2011-08-12 11:10:43 -04:00
girmodule.h girepository: Consistently prefix internal functions with _ 2010-11-16 16:58:39 -05:00
girnode.c Allow enums and bitfields to have static methods 2011-08-16 18:43:23 +02:00
girnode.h Allow enums and bitfields to have static methods 2011-08-16 18:43:23 +02:00
giroffsets.c Rename ALIGN to GI_ALIGN to prevent redefining this macro on some platforms 2011-06-21 13:44:56 +02:00
girparser.c parser: prevents a segfault when _g_ir_parser_parse_string returns NULL error was not set. 2011-10-18 16:59:34 +01:00
girparser.h girepository: Consistently prefix internal functions with _ 2010-11-16 16:58:39 -05:00
girwriter.c Switch to storing string form of error quarks 2011-08-12 11:10:43 -04:00
girwriter.h [girwriter] Refactor out of generate.c 2010-06-07 10:52:43 -03:00
gisignalinfo.c [GIRepository] Add missing transfer and skip 2010-08-31 17:50:44 -03:00
gisignalinfo.h [girepository] Move the rest out of ginfo.ch 2010-06-06 19:54:53 -03:00
gistructinfo.c [girepository] Document GIStructInfo & GIUnionInfo 2010-09-05 11:04:27 -03:00
gistructinfo.h [girepository] Move the rest out of ginfo.ch 2010-06-06 19:54:53 -03:00
gitypeinfo.c Deprecate ErrorDomain 2011-08-12 11:10:43 -04:00
gitypeinfo.h Deprecate ErrorDomain 2011-08-12 11:10:43 -04:00
gitypelib-internal.h Allow enums and bitfields to have static methods 2011-08-16 18:43:23 +02:00
gitypelib.c gitypelib: Fix compiler warnings 2011-12-01 10:55:19 -05:00
gitypelib.h Remove extra lines from the license comment 2010-09-06 11:23:01 +02:00
gitypes.h Deprecate ErrorDomain 2011-08-12 11:10:43 -04:00
giunioninfo.c [girepository] Document GIStructInfo & GIUnionInfo 2010-09-05 11:04:27 -03:00
giunioninfo.h [girepository] Move the rest out of ginfo.ch 2010-06-06 19:54:53 -03:00
givfuncinfo.c Add g_vfunc_info_invoke and g_vfunc_info_get_address 2011-01-12 20:05:09 +01:00
givfuncinfo.h Add g_vfunc_info_invoke and g_vfunc_info_get_address 2011-01-12 20:05:09 +01:00
glib-compat.h Substitute deprecated Glib symbol: g_mapped_file_free 2009-12-15 11:06:50 -02:00
gthash-test.c Add internal hashing API designed for the typelib 2010-12-03 16:03:32 -05:00
gthash.c Add internal hashing API designed for the typelib 2010-12-03 16:03:32 -05:00