Skip to content

gstrvbuilder: Add g_strv_builder_take

Guido Günther requested to merge guidog/glib:g-strv-builder-take into main

g_strv_builder_take() allows to transfer ownership of the passed in string.

This can be useful to avoid additional allocations when using functions that transfer ownership to the caller like g_strdup_printf().

The testcase uses g_strv_builder_take and g_strv_builder_add to demo that calls can be mixed.

Merge request reports