Re: [Vala] how to pass a List by reference?

2011-10-15 Thread Maciej Marcin Piechotka
On Fri, 2011-10-14 at 08:22 -0700, bsquared wrote: Martin Ertsås mert...@cisco.com writes: You could use out instead to populate the list: static void populate_list (out Sliststring list) { } And call this method with: var list = new Sliststring (); populate_list (out list);

Re: [Vala] how to pass a List by reference?

2011-10-15 Thread Luca Bruno
On Sat, Oct 15, 2011 at 1:45 PM, Maciej Marcin Piechotka uzytkown...@gmail.com wrote: The empty list is NULL not new SListstring (). new SListstring () is a list of length 1 with garbage as contents. new SList() is NULL by definition in vala, it's special cased. -- www.debian.org - The

[Vala] namespaces bug

2011-10-15 Thread niXman
Hello list! This simple vala-code: namespace NameSpaceName {int myval = 2;} namespace name_space_name {int myval = 3;} void main() { NameSpaceName.myval = 3; name_space_name.myval = 4; } produce this C-code: ... extern gint name_space_name_myval; gint name_space_name_myval = 2; gint

[Vala] trouble with make: note: previous definition ...

2011-10-15 Thread bsquared
Hello, I saw this in the past when I moved classes and namespaces using make to build. I solved this by avoiding make and running valac directly. I am seeing it this again, but the circumstances are different. I would like to know the cause and what steps to take to avoid it. I use

Re: [Vala] namespaces bug

2011-10-15 Thread Tal Hadad
Yes it's a disadvantage(if you look this way) of Vala, but don't think it's a bug. You see, Vala is based on GObject in pure C, and the cname of NameSpaceName is name_space_name... But I your post make me wonder, shell Vala convert name_space_name to cname name__space__name for compatibility, or

[Vala] Making a class iterable from VAPI bindings

2011-10-15 Thread Calvin Walton
Hi everyone. I'm currently writing up a .vapi file to create bindings for the libmusicbrainz4 library's C interface (download at http://musicbrainz.org/doc/libmusicbrainz - online documentation at http://users.musicbrainz.org/~luks/docs/libmusicbrainz4/mb4__c_8h.html ) It has a list type, which

Re: [Vala] Making a class iterable from VAPI bindings

2011-10-15 Thread Luca Bruno
On Sat, Oct 15, 2011 at 10:47 PM, Calvin Walton calvin.wal...@kepstin.cawrote: Is there any way to add an iterator class to my .vapi file so I can use foreach, or any plans to allow foreach on types which provide a length property and get(index) method? Call it size instead of length. --

Re: [Vala] Making a class iterable from VAPI bindings

2011-10-15 Thread Calvin Walton
On Sat, 2011-10-15 at 23:37 +0200, Luca Bruno wrote: On Sat, Oct 15, 2011 at 10:47 PM, Calvin Walton calvin.wal...@kepstin.cawrote: Is there any way to add an iterator class to my .vapi file so I can use foreach, or any plans to allow foreach on types which provide a length property and

Re: [Vala] Making a class iterable from VAPI bindings

2011-10-15 Thread Luca Bruno
On Sun, Oct 16, 2011 at 12:47 AM, Calvin Walton calvin.wal...@kepstin.cawrote: So nice, in fact, that I just added it myself. Thanks for the contribution. Now I'm having some additional problems; the code public static void test(AnnotationList a) { foreach (unowned Annotation b in

Re: [Vala] Making a class iterable from VAPI bindings

2011-10-15 Thread Calvin Walton
On Sun, 2011-10-16 at 01:00 +0200, Luca Bruno wrote: On Sun, Oct 16, 2011 at 12:47 AM, Calvin Walton calvin.wal...@kepstin.cawrote: Now I'm having some additional problems; the code public static void test(AnnotationList a) { foreach (unowned Annotation b in a) {

[Vala] Compiling VTG under Ubuntu 11.10

2011-10-15 Thread rastersoft
Hi all: I updated my system to Ubuntu 11.10, and now I can't use VTG. There's no package for it, and I can't compile the source code from git. If I install only libvala-0.14, the configure script returns an error, saying that libvala is older than libvala-0.12. If I install libvala-0.12, then

Re: [Vala] Compiling VTG under Ubuntu 11.10

2011-10-15 Thread bsquared
rastersoft ras...@rastersoft.com writes: Hi all: I updated my system to Ubuntu 11.10, and now I can't use VTG. There's no package for it, and I can't compile the source code from git. If I install only libvala-0.14, the configure script returns an error, saying that libvala is older than