Re: [Vala] Patching valac source for a Launchpad PPA

2010-04-27 Thread Michael Wild
On 27. Apr, 2010, at 24:14 , Darren Warner wrote: Apologies, this is a Launchpad question, but it is quite vala-specific. I'm uploading a patched valac to my own launchpad PPA. The problem I'm coming across is that the timestamps of the generated/included .c files must be later than

Re: [Vala] Binding a function that return a structure, not a pointer

2010-04-27 Thread Darren Warner
I have a more complete, though surely less tested libexif.vapi if anyone is interested (vala-gen-introspect created a respectable .gi file even though libexif is not GObject-based). I'm happy to maintain these files until they are a part of vala or the libexif package, though admittedly I

[Vala] Sorting an array of instances.

2010-04-27 Thread Fabian Deutsch
Hello, I've got problems sorting an array of instances. Take the following code: code class Foo { public float val; } static int cmp_foo(void* a, void* b) { return ((Foo*)a)-val - ((Foo*)b)-val 0 ? -1 : 1; } void main(string[] args) { Foo[] fs = new Foo[10];

Re: [Vala] Singleton and reference count

2010-04-27 Thread Jiří Zárevúcky
Jonh Wendell píše v Út 27. 04. 2010 v 10:46 -0300: Hi, folks. I wrote a simple singleton: And in the other file, I do: var prefs = Prefs.default (); use prefs var... The prefs var doesn't get destroyed, thus my destructor is never called. [...] It refs the result variable

Re: [Vala] Singleton and reference count

2010-04-27 Thread Jiří Zárevúcky
Mike Massonnet píše v Út 27. 04. 2010 v 18:11 +0200: 2010/4/27 Sam Wilson tecywiz...@hotmail.com: On Tue, 2010-04-27 at 10:46 -0300, Jonh Wendell wrote: Hi, folks. I wrote a simple singleton: public class Prefs { private static Prefs instance; public static Prefs default() {

[Vala] [vapigen] How to replace the abstract by virtual

2010-04-27 Thread Nicolas Joseph
Hello, I try to replace an abstract method by a virtual method with this metadata: gtk_source_completion_provider_activate_proposal abstract=0 virtual=1 But this has no effect. -- Nicolas Joseph ___ vala-list mailing list vala-list@gnome.org

Re: [Vala] Singleton and reference count

2010-04-27 Thread Sam Wilson
On Tue, 2010-04-27 at 19:42 +0200, Jiří Zárevúcky wrote: Jonh Wendell píše v Út 27. 04. 2010 v 10:46 -0300: Hi, folks. I wrote a simple singleton: And in the other file, I do: var prefs = Prefs.default (); use prefs var... The prefs var doesn't get destroyed, thus my

Re: [Vala] Sorting an array of instances.

2010-04-27 Thread Nor Jaidi Tuah
static int cmp_foo(void* a, void* b) { return ((Foo*)a)-val - ((Foo*)b)-val 0 ? -1 : 1; } Use: (*((Foo**)a))-val In Foo x; x is a pointer if Foo is a class, but an actual structure if Foo is a struct (unless I misunderstood vala). hand Nor Jaidi Tuah