[Vala] vala generated function naming
- From: Jeremy Slater <jasl8r gmail com>
- To: vala-list gnome org
- Subject: [Vala] vala generated function naming
- Date: Sun, 12 Oct 2014 09:37:16 -0400
I'm having an issue with the way vala generates names for functions like
callback wrappers and struct array free routines. I am writing a vapi for
a library that does not typedef structures, so in my vapi I have to set the
cname to include struct, i.e. cname="struct some_structure". This results
in the generated free for an array of some_structure being generated as
"_vala_struct some_structure_array_free".
In addition, the header I am wrapping defines callbacks as function
definitions, rather than function pointers. So when I define my delegates
I have to include the * in the cname: cname="callback_function *". This
results in a wrapper function for a delegate of "test_callback" being
generated as "_test_callback_callback_function *".
In order to solve both these problems I have added some string replace
methods to swap spaces and *'s for underscores, although certainly not
everywhere that this issue could appear. Is there a better solution I
should be using, like setting array copy function names in the vapi similar
to how you can set the destroy function name?
Thanks,
Jeremy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]