[Vala] bug in terniary conditionial
- From: pancake <pancake youterm com>
- To: vala paldo org
- Subject: [Vala] bug in terniary conditionial
- Date: Wed, 3 Oct 2007 02:12:01 +0200
Theres a problem when using terniary conditional operator (?) when
freeing the resources.. It works once.. but not twice, so it makes
a double free.
Here's the snippet:
------------------------------------
using GLib;
class terti
{
public static string miau(bool a)
{
return a?"1":"0";
}
public static void main(string[] args)
{
stdout.printf(miau(true));
stdout.printf(miau(false));
}
}
---------------------------------------
--pancake
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]