]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
support delegates throwing exceptions, patch by Andrea Del Signore, fixes
authorJuerg Billeter <j@bitron.ch>
Mon, 18 Feb 2008 21:21:05 +0000 (21:21 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Mon, 18 Feb 2008 21:21:05 +0000 (21:21 +0000)
2008-02-18  Juerg Billeter  <j@bitron.ch>

* gobject/valaccodegenerator.vala: support delegates throwing
  exceptions, patch by Andrea Del Signore, fixes bug 517024

svn path=/trunk/; revision=1016

ChangeLog
gobject/valaccodegenerator.vala

index 6a9893d37ee11d456752db337ac8588be706cd06..a0a8997c3a3be79fbefaff9c459fa7b03602cc60 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-18  Jürg Billeter  <j@bitron.ch>
+
+       * gobject/valaccodegenerator.vala: support delegates throwing
+         exceptions, patch by Andrea Del Signore, fixes bug 517024
+
 2008-02-18  Jürg Billeter  <j@bitron.ch>
 
        * vapi/packages/gnet-2.0/: update to use vala-gen-introspect
index 3a80e68e787f41abd58809ce58f0a6e3ddcedd10..417f17a3b8f7c8aee1ec264df4e3dbf02daabdc1 100644 (file)
@@ -3148,6 +3148,11 @@ public class Vala.CCodeGenerator : CodeGenerator {
 
                }
 
+               if (m.get_error_domains ().size > 0) {
+                       var cparam = new CCodeFormalParameter ("error", "GError**");
+                       cparam_map.set (get_param_pos (-1), cparam);
+               }
+
                // append C parameters in the right order
                int last_pos = -1;
                int min_pos;
@@ -3197,6 +3202,10 @@ public class Vala.CCodeGenerator : CodeGenerator {
                        i++;
                }
 
+               if (m.get_error_domains ().size > 0) {
+                       carg_map.set (get_param_pos (-1), new CCodeIdentifier ("error"));
+               }
+
                var ccall = new CCodeFunctionCall (new CCodeIdentifier (m.get_cname ()));
 
                // append C arguments in the right order