summaryrefslogtreecommitdiff
path: root/gi/arg-inl.h
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2020-07-10 23:03:00 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2020-07-27 21:58:27 -0700
commit87e293312535ca7e1bb99e225900cae8a063d6de (patch)
treef5b0186cd1f7e458813555f312903d6e2096fb14 /gi/arg-inl.h
parente4eef177898f501d7e61a4dfc9e49a8aaa7bf91a (diff)
downloadgjs-87e293312535ca7e1bb99e225900cae8a063d6de.tar.gz
arg: Add GIArgument setter overload for char32_t
This provides a semantic difference between gunichar and uint32_t.
Diffstat (limited to 'gi/arg-inl.h')
-rw-r--r--gi/arg-inl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gi/arg-inl.h b/gi/arg-inl.h
index 5e5d411c..0430fc3a 100644
--- a/gi/arg-inl.h
+++ b/gi/arg-inl.h
@@ -88,6 +88,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) {