GNOME Bugzilla – Bug 743877
Miscalculation of length of null-terminated out array parameter
Last modified: 2015-05-26 14:37:32 UTC
Created attachment 295964 [details] Sample program If I have a function which returns a null-terminated array as an out parameter (e.g. the alternates parameter of g_str_tokenize_and_fold()), the length of the returned array is calculated as -1, rather than having _vala_array_length() called on it. Sample program attached. Both assertions should pass — for me, with Vala 0.27.1.7-1a9de, the second assertion fails.
luca@cl170:~/my/vala (master)$ git show commit e7be2626460c5de651df8f3bde7ead718d7b31aa Author: Luca Bruno <lucabru@src.gnome.org> Date: Wed Mar 4 14:57:01 2015 +0100 codegen: handle out param of null-terminated array Fixes bug 743877 This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.
Created attachment 304016 [details] Fix of valaccodemethodcallmodule