G_key_file_get_integer_list(), transfer container?

I am trying to fix a bug in the Nim language bindings, see https://github.com/StefanSalewski/gintro/issues/98

And I am wondering about


Result is marked as [transfer container]

Makes that sense for a gint array result? Should it not be transfer-full?

Not a big issue, but as far as I can see this function is the only one with “transfer container” for a int-array result. Is [transfer container] not more directed to GList and similar complixated types?

In case of fundamental types and anything that doesn’t need freeing per item, transfer full and transfer container are equivalent.

For an array of GObject* (i.e. GObject**), for example, the two would be different and you would have to unref() each item in case of transfer full in addition to freeing the array itself via g_free() in both cases.

I agree that transfer container is a bit strange in this specific situation with plain integers. It’s the same for many other similar functions on GKeyFile though.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.