Modifying GHashTable in-place doesn't work
Submitted by Igor Gnatenko
I have code which looks like
/** * ModulemdModuleMetadata:buildrequires: (type GLib.HashTable(utf8,utf8)) (transfer full) */ properties [PROP_BUILDREQUIRES] = g_param_spec_boxed ("buildrequires", "Module BuildRequires", "A dictionary property representing the required " "build dependencies of the module. Keys are the " "required module names (strings), values are their " "required stream names (also strings).", G_TYPE_HASH_TABLE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
I've tried all transfer methods (none, container, full), but if I do
foo.props.buildrequires["bar"] = "baz"
print(foo.props.buildrequires), it is not modified. In
get_property() I return
g_hash_table_ref (self->buildrequires), so I expect that really to work.
Let me know if I should provide some more details or this is a bug or I'm just dumb.