GNOME Bugzilla – Bug 771790
Markup.collect_attributes should have attribute_names and _values bound as null-terminated
Last modified: 2016-09-23 17:31:27 UTC
Currently, it generates code like: g_markup_collect_attributes (_tmp2_, _tmp3_, _tmp3__length1, _tmp4_, _tmp4__length1, &_inner_error_, G_MARKUP_COLLECT_BOOLEAN, "Assigned", &assigned, G_MARKUP_COLLECT_INVALID);
Created attachment 336100 [details] [review] glib-2.0: Fix binding of Markup.collect_attributes Array parameters don't have an associcated length parameter but are null-terminated.
Review of attachment 336100 [details] [review]: Matches documented API: https://developer.gnome.org/glib/stable/glib-Simple-XML-Subset-Parser.html#g-markup-collect-attributes Docs state "The element_name , attribute_names , attribute_values and error parameters passed to the start_element callback should be passed unmodified to this function." and from the start_element callback "The callback's attribute_names and attribute_values parameters are NULL-terminated."
Review of attachment 336100 [details] [review]: Why is array_length = false necessary. See https://wiki.gnome.org/Projects/Vala/LegacyBindings#Arrays
Because just having the array_null_terminated = true annotation does not make the array_length parameter disappear
Review of attachment 336100 [details] [review]: > Because just having the array_null_terminated = true annotation does not make the array_length parameter disappear OK, that's useful to know
Attachment 336100 [details] pushed as 34f3b85 - glib-2.0: Fix binding of Markup.collect_attributes