[Vala] const pointers



Is there any way in vala to specify 'const void*' / 'gconstpointer'? I often get warnings from gcc, because 'void*' in vapi files translate to gpointer, not gconstpointer. 

If not, maybe 'void*' should be made 'const void* by default, just like string becomes 'const char*'. To make a regular old 'void*' the '#' operator could be used. I realize that's not ideal since '#' means "transfer ownership", while there is no ownership of pointers, but it is possible to make some analogies.

Michael

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