Re: [Vala] sentinel patch



Hi Sam,

If you don't want this patch to be forgotten then you're better off
filing a new enhancement bug on bugzilla and attaching the patch
there.

Cheers,
Jared

2008/8/18 Sam Liddicott <sam liddicott com>:
This updated fact takes nto account that property setters return weak
strings.



This patch allows sentinels to be specified on a class and apply to all
varargs methods of that class and subclasses.

it also allows an empty string to be specified
[CCode (sentinel="")]

which results in no sentinel argument being emitted.

I find it useful so I can declare access to macro's of a c library
without vala worrying about the arguments matching up; as traditionally
macros can be very liberal about arguments.

to use Samba's DLIST_ADD, I can use DLIST.ADD declared below:

   [Compact]
   [CCode (cprefix="DLIST_")]
   [CCode (sentinel="")]
   class DLIST {
       public static void REMOVE(...);
       public static void ADD(...);
   }

Sam



_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list





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