[Vala] 'const' in string parameter



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'?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]