On Sun, 09 Mar 2008 13:10:26 +0100
Andrea Del Signore <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> since yesterday I wrote an HelloWorld xchat plugin just because I was
> bored, I thought that sharing the vapi could be useful to someone else.

wow nice :)

> Some comments on the vapi follows:
> 
> 1) in the init & get_info functions I use pointers to pointer because if
> not vala try to free an invalid pointer.

use 'weak' to skip the vala memory management for a variable.

btw reading your example maybe you'll need to use 'out' and 'ref' attributes.

> 2) The vapi can be better if it try to use virtual methods for the init,
> deinit & get_info functions, but first I must investigate on how vala
> support virtual methods in classes that don't derive from GLib.Object

read sqlite3.vapi as example vapi, i take lot of ideas from it. You can
setup the init and deinit methods as constructor and destructor, so vala
will take care of them in a proper way.

My lua vapi hasn't been imported into vala, so I think that maybe Jurg
thinks that this is not imoprtant to be in valac tarball. So I propose
to create a community maintained repository for VAPIs.

What do you think?

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

Reply via email to