[gjs/arg-inlines: 3/9] arg: Add GIArgument setter overload for char32_t
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/arg-inlines: 3/9] arg: Add GIArgument setter overload for char32_t
- Date: Sat, 11 Jul 2020 22:24:46 +0000 (UTC)
commit 53fb5a39573a14523b20f4bd189f57a7445ac0cb
Author: Philip Chimento <philip chimento gmail com>
Date: Fri Jul 10 23:03:00 2020 -0700
arg: Add GIArgument setter overload for char32_t
This provides a semantic difference between gunichar and uint32_t.
gi/arg-inl.h | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gi/arg-inl.h b/gi/arg-inl.h
index 17d9f9ea..ca910107 100644
--- a/gi/arg-inl.h
+++ b/gi/arg-inl.h
@@ -87,6 +87,12 @@ GJS_USE inline decltype(auto) gjs_g_argument_value<uint64_t>(GIArgument* arg) {
return gjs_g_argument_value(arg, &GIArgument::v_uint64);
}
+// gunichar is stored in v_uint32
+template <>
+GJS_USE inline decltype(auto) gjs_g_argument_value<char32_t>(GIArgument* arg) {
+ return gjs_g_argument_value(arg, &GIArgument::v_uint32);
+}
+
template <>
GJS_USE inline decltype(auto) gjs_g_argument_value<GType, GI_TYPE_TAG_GTYPE>(
GIArgument* arg) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]