On Sam, 2007-03-10 at 00:19 -0600, Cayle Graumann wrote:
Jurg,
I'm having a hard time with the new creation syntax in vapi
files. As of revision 228, It looks like the compiler is ignoring any
[CCode] directives when it sees a creation method definition .
You can see this with the String.sized method in glib-2.0.vala
Inside of vapi/glib-2.0.vala (line 1197)
[CCode (cname = "g_string_sized_new")]
public String.sized (ulong dfl_size);
However when you use this function like so
var line = new String.sized(1024);
The compiler generates:
GString* line = g_string_new_sized (1024);
instead of
GString* line = g_string_sized_new (1024);
Thanks for the report. You can apply the attached patch to fix the issue. Jürg
Attachment:
vala-creationmethod-cname.diff
Description: Text Data