Re: [Vala] List behavior with new operator



On Mon, 2006-08-28 at 11:52 +0200, Jürg Billeter wrote:
On Sam, 2006-08-26 at 21:57 -0500, Cayle Graumann wrote:
I've discovered something:  If you use a List object, be sure not to
use the new operator followed by append.  It adds a null object to the
list, that will cause you to get failed assertions when you iterate
through the List.
[...]
I don't know if this is something fixable in Vala because it seems the
result of the way GList is implemented in GLib, but maybe something
can be done with the new operator so as not to actually create a null
object.  I would image this behavior holds true for some of the other
GLib container classes as well.

Will probably special case the constructor of GList and GSList to just
return null, thanks for the report.

Fixed in SVN.

Jürg




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