codegen: Fix a typo in g_variant_get_objv()

g_variant_get_objpathv() doesn’t exist. The code actually meant
g_variant_get_objv().

This fixes a leak with `ao`-type properties in generated code.
Previously they wouldn’t be freed; now the container is (correctly)
freed.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=770335
This commit is contained in:
Philip Withnall
2018-01-17 16:12:25 +00:00
parent 79d9ea2598
commit 567e5548bb

View File

@@ -1830,9 +1830,9 @@ class CodeGenerator:
# for details
#
free_container = False;
if p.arg.gvariant_get == 'g_variant_get_strv' or p.arg.gvariant_get == 'g_variant_get_objpathv' or p.arg.gvariant_get == 'g_variant_get_bytestring_array':
if p.arg.gvariant_get == 'g_variant_get_strv' or p.arg.gvariant_get == 'g_variant_get_objv' or p.arg.gvariant_get == 'g_variant_get_bytestring_array':
free_container = True;
# If already using an old value for strv, objpathv, bytestring_array (see below),
# If already using an old value for strv, objv, bytestring_array (see below),
# then just return that... that way the result from multiple consecutive calls
# to the getter are valid as long as they're freed
#