gstrfuncs: Add missing (transfer none) annotations for several funcs
These unfortunately have gchar*
return types rather than const gchar*
. This is a historical artifact which we can’t change: while
adding const
would only be an API break and not an ABI break, it would
cause all sorts of C++ code which uses GLib to emit new cast warnings
(similarly, C code with const correctness compiler warnings enabled
would do the same).
The incorrect return type causes the GIR scanner to (reasonably) assume the return value is allocated, which is wrong.
Fix that by explicitly adding (transfer none)
.
Also add an explicit (nullable)
because all three functions are.
Signed-off-by: Philip Withnall pwithnall@gnome.org Fixes: #3286 (closed)
Closes #3286 (closed)