[gjs/mcatanzaro/#336] Fix build on 32-bit architectures
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/mcatanzaro/#336] Fix build on 32-bit architectures
- Date: Mon, 3 Aug 2020 21:17:42 +0000 (UTC)
commit 843b729c6c4c86084af6a681a5f998ef9581de11
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Mon Aug 3 16:15:31 2020 -0500
Fix build on 32-bit architectures
Turns out GType is defined differently in C++ than in C:
/**
* GType:
*
* A numerical value which represents the unique identifier of a registered
* type.
*/
#if GLIB_SIZEOF_SIZE_T != GLIB_SIZEOF_LONG || !defined __cplusplus
typedef gsize GType;
#else /* for historic reasons, C++ links against gulong GTypes */
typedef gulong GType;
#endif
Fix suggested by Philip Chimento. Special credit to Jordan for teaching
me how to do a 32-bit build with buildstream!
Fixes #336
gi/arg-inl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gi/arg-inl.h b/gi/arg-inl.h
index 7a109ef4..087c8314 100644
--- a/gi/arg-inl.h
+++ b/gi/arg-inl.h
@@ -113,7 +113,7 @@ GJS_USE inline decltype(auto) gjs_arg_member<char32_t>(GIArgument* arg) {
template <>
GJS_USE inline decltype(auto) gjs_arg_member<GType, GI_TYPE_TAG_GTYPE>(
GIArgument* arg) {
- return gjs_arg_member(arg, &GIArgument::v_size);
+ return gjs_arg_member(arg, &GIArgument::v_ulong);
}
template <>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]