From 806c5059f989ed1b8bc62e6aa1ef55123ac110de Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 18 May 2018 15:16:45 +0100 Subject: [PATCH] gi/pygi-argument: Squash critical warning when using array as hash value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using a GPtrArray as the value type of a GHashTable currently produces a warning: Unsupported type array for example when calling a function whose return type is annotated as: (transfer container) (element-type filename GPtrArray) Since we don’t treat objects (GI_TYPE_TAG_INTERFACE) specially when marshalling to/from GHashTable, we shouldn’t need to treat arrays specially either. Handle the case explicitly. Signed-off-by: Philip Withnall --- gi/pygi-argument.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c index cbec0dd88..76ce8b4b8 100644 --- a/gi/pygi-argument.c +++ b/gi/pygi-argument.c @@ -144,6 +144,7 @@ _pygi_hash_pointer_to_arg (GIArgument *arg, case GI_TYPE_TAG_UTF8: case GI_TYPE_TAG_FILENAME: case GI_TYPE_TAG_INTERFACE: + case GI_TYPE_TAG_ARRAY: break; default: g_critical ("Unsupported type %s", g_type_tag_to_string(type_tag)); @@ -174,6 +175,7 @@ _pygi_arg_to_hash_pointer (const GIArgument *arg, case GI_TYPE_TAG_UTF8: case GI_TYPE_TAG_FILENAME: case GI_TYPE_TAG_INTERFACE: + case GI_TYPE_TAG_ARRAY: return arg->v_pointer; default: g_critical ("Unsupported type %s", g_type_tag_to_string(type_tag)); -- GitLab