if the function receives a char* then it is a "ref string s" or "out
string s", string is
obviously const, because the function will not modify it. You can also
use directly
pointers using "char*", but "ref char s" is wrong.
Viktor Semykin wrote:
Hi everyone.
I'm new to vala and I'm sorry in advance for noob question.
I need to define function with "char*" parameter to use as C library
callback. When I try to define
public static void my_method (string s);
it generates "const char* s" so compiler is confused with different
definitions and fails to compile. I found a workaround for this case
public static void my_method (ref char s);
but I dont like it.
Is there a way to get rid of 'const'?
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list