mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
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:
@@ -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
|
||||
#
|
||||
|
Reference in New Issue
Block a user