GNOME Bugzilla – Bug 595587
Properties whose types are nullable structs are being handled incorrectly
Last modified: 2009-09-26 14:10:18 UTC
using GLib; public class Blah: Object { public Foo? foo { get{ return myFoo; } set { if(null == value) { myFoo = Foo(); } else { myFoo = value; } } } private Foo myFoo; public static int main(){ return 0; } } public struct Foo { public int x; public Foo(){ x = 0; } }// Foo /** Generated C Code for foo setter void blah_set_foo (Blah* self, Foo* value) { g_return_if_fail (self != NULL); if (NULL == (*value)) { Foo _tmp0_ = {0}; self->priv->myFoo = (foo_init (&_tmp0_), _tmp0_); } else { self->priv->myFoo = *(*value); } g_object_notify ((GObject *) self, "foo"); } **/ /** Valac output > valac -o blah blah.vala /home/lbar4/dev/blah.vala.c: In function ‘blah_set_foo’: /home/lbar4/dev/blah.vala.c:97: error: invalid operands to binary == (have ‘void *’ and ‘Foo’) /home/lbar4/dev/blah.vala.c:101: error: invalid type argument of ‘unary *’ (have ‘Foo’) /home/lbar4/dev/blah.vala.c: In function ‘blah_get_property’: /home/lbar4/dev/blah.vala.c:146: error: too many arguments to function ‘blah_get_foo’ error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) **/
commit 217a1a82d63ee8e4aedcdf3409de4f12cc38c962 Author: Jürg Billeter <j@bitron.ch> Date: Mon Sep 21 20:44:34 2009 +0200 D-Bus: Support name attribute for members in clients and servers Fixes bug 595587.
Sorry, wrong bug.
commit 0920805aa49de47216f1d1f5d4b2ff9c92df5d61 Author: Jürg Billeter <j@bitron.ch> Date: Tue Sep 22 22:58:10 2009 +0200 Fix nullable struct properties Fixes bug 595587.
commit 65ff8c34df5fd892e209e570c292a5f6a5c4d0ed Author: Jürg Billeter <j@bitron.ch> Date: Sat Sep 26 16:09:51 2009 +0200 Add test for bug 595587