[Vala] minimal va_arg binding.



Hi,

vala supports "...", in function declarations, but doesn't support va_args.

The following vapi works as a minimal binding for va_args.

At least it will allow us to declare this function/similar vprintf
friends in glib.vapi:

public static GLib.Object g_object_new_valist(GLib.Type object, string
first_prop, va_list va);

[SimpleType]
[CCode (cheader_filename="stdarg.h",
        cprefix="va_",
        has_type_id = false
        )]
public struct va_list {
    public void start(int last);
    public void end();
}


An issue with this vapi is that in 0.5.6, vala gives the following criticals:
[f]$ valac -C value.vala va.vapi

** (valac:9147): CRITICAL **: vala_ccode_base_module_check_type:
assertion `type != NULL' failed

** (valac:9147): CRITICAL **: vala_ccode_base_module_requires_destroy:
assertion `type != NULL' failed

** (valac:9147): CRITICAL **: vala_ccode_base_module_requires_destroy:
assertion `type != NULL' failed



Yu



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