Hi.
I have a property in my class like so:
public Line[] lines
{
owned get
{
...
}
}
The signature of the generated C code looks like this:
Line** class_name_get_lines (ClassName* self, int* result_length1);
I'm not particularly fond of the "result_length1" parameter name, so I
looked up documentation on the CCode attribute, and it has a setting
named "array_length_cname" that looked like it was just what I was
looking for. Sadly, whether I placed it on the attribute or the get
itself, the generated code would still use the parameter name
"result_length1." That is, neither of these two worked:
[CCode(array_length_cname = "count")]
public Line[] lines
{
owned get
{
...
}
}
public Line[] lines
{
[CCode(array_length_cname = "count")]
owned get
{
...
}
}
An interesting observation is that the .vapi file generated retains the
CCode attribute in the location I placed it, but the .h file generated
still calls it "result_length1." In other words, placing either of those
CCode attributes creates an incompatibility between the .vapi and the .h
from valac.
Since this isn't working, I have a feeling I'm going about this all
wrong... any hints or pointers?
Regards,
Alexander K. Schrøder
Attachment:
signature.asc
Description: OpenPGP digital signature