Deprecate inout in favour of separate in and out annotations
As discussed on gir-devel-list, the (inout)
annotation doesn't allow for different transfer modes on in and out arguments.
So, for example, this
/**
* gtk_init_check:
* @argc: (inout): Address of the `argc` parameter of
* your main() function (or 0 if @argv is %NULL). This will be changed if
* any arguments were handled.
* @argv: (array length=argc) (inout) (allow-none): Address of the
* `argv` parameter of main(), or %NULL. Any options
* understood by GTK+ are stripped before return.
* ...
*/
would become this:
/**
* gtk_init_check:
* @argc.in: (in) (transfer none): Address of the `argc` parameter of
* your main() function (or 0 if @argv.in is %NULL).
* @argc.out: (out) (transfer none): If any arguments were handled, this is
* the new length of @argv.out. If not, same as @argc.in.
* @argv.in: (array length=argc.in) (in) (allow-none) (transfer none): Address
* of the `argv` parameter of main(), or %NULL.
* @argv.out: (array length=argc) (out) (transfer none): The array @argv.in
* with any options understood by GTK+ stripped.
* ...
*/
The (inout)
annotation should continue to work, but it should be explicitly specified what in and out transfer modes are assumed for each of (inout) (transfer full)
, (inout) (transfer container)
, and (inout) (transfer none)
. These are currently not specified, and have changed over the history of gobject-introspection. This is causing problems such as gjs#95 (closed).