GNOME Bugzilla – Bug 592769
no_delegate_target Delegate Field as an argument produces uncompilable ccode
Last modified: 2010-03-26 17:23:00 UTC
If a delegate field is passed as an argument to a function call, and the delegate field doesn't have a target, the produced ccode doesn't compile. Example Code: --- log.vala --- public static void main() { Log.set_default_handler(g_log_default_handler); } --- log.vapi ---- [CCode (delegate_target = false)] public GLib.LogFunc g_log_default_handler; valac log.vala log.vapi /home/rainwoodman/Projects/vala/log.vala.c: In function ‘_main’: /home/rainwoodman/Projects/vala/log.vala.c:13: error: ‘g_log_default_handler_target’ undeclared (first use in this function) /home/rainwoodman/Projects/vala/log.vala.c:13: error: (Each undeclared identifier is reported only once /home/rainwoodman/Projects/vala/log.vala.c:13: error: for each function it appears in.) error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) The attachement fixes this issue.
There is no attachement visible, could you please upload?
Created attachment 145624 [details] [review] the patch I believe the g_log_default_handler binding is a workaround for this issue.
commit 02ff2455fe5f21d06ca431b078a15de03eaf3144 Author: Jürg Billeter <j@bitron.ch> Date: Wed Mar 24 08:52:04 2010 +0100 Fix passing delegate field without target as method argument Fixes bug 592769.
*** Bug 577620 has been marked as a duplicate of this bug. ***