Re: [Vala] function pointers?
- From: Raffaele Sandrini <rasa gmx ch>
- To: David Keijser <keijser gmail com>
- Cc: vala paldo org
- Subject: Re: [Vala] function pointers?
- Date: Wed, 28 Mar 2007 14:24:18 +0200
Commited to SVN revision 269.
Thanks.
Raffaele
On Mit, 2007-03-28 at 13:04 +0200, David Keijser wrote:
Thanks.
I should probably have checked the test first :/
anyway, HashFunc and EqualFunc in glib-2.0.vapi is declared as empty
structs and not as callbacks as expected(?). in an earlier mail from
Jürg he said the glib vapi was handwritten so I'm attaching a patch to
change this.
On 3/28/07, Mathias Hasselmann <mathias hasselmann gmx de> wrote:
"grep call callback" revealed the following test-cases demonstrating
function pointer usage:
http://svn.gnome.org/svn/vala/trunk/vala/tests/test-014.vala
http://svn.gnome.org/svn/vala/trunk/vala/tests/test-015.vala
http://svn.gnome.org/svn/vala/trunk/vala/tests/test-024.vala
Ciao,
Mathias
Am Dienstag, den 27.03.2007, 19:25 +0200 schrieb David Keijser:
Hi.
is it possible to use function pointers in vala at the moment. if so
could you provide a small sample on how to use them?
the reason i need them is because I'm writing a simple hash set and i
thought it would be a good idea to use GHashFunc from the hash table
in GLib.
btw, while playing around trying to include C code in the vala source
i found a way to break out of a comment. e.g
//*/ hash = ((GHashFunc)self->priv->_hashMethod)(o);/*
results in
/**/ hash = ((GHashFunc)self->priv->_hashMethod)(o);/**/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]