]> git.draconx.ca Git - gob-dx.git/blobdiff - src/parse.y
Release 0.90.5
[gob-dx.git] / src / parse.y
index 46fdf6ef17686abde31e4047c16e2adab0d52620..7d01a5df5b0bd07ed5c1089f30086dab4c45aa7c 100644 (file)
@@ -104,6 +104,20 @@ push_function(int scope, char *oid, char *id, char *onerror,
                type = (Type *)new_type(0,g_strdup("void"));
        }
        
+       /* a complicated and ugly test to figure out if we have
+          the wrong number of types for a signal */
+       if((scope == SIGNAL_FIRST_METHOD ||
+           scope == SIGNAL_LAST_METHOD ||
+           scope == PRIVATE_SIGNAL_FIRST_METHOD ||
+           scope == PRIVATE_SIGNAL_LAST_METHOD) &&
+          g_list_length(gtktypes) != g_list_length(funcargs) &&
+          !(g_list_length(funcargs) == 1 &&
+            g_list_length(gtktypes) == 2 &&
+            strcmp(gtktypes->next->data,"NONE")==0)) {
+               print_error(TRUE, _("The number of GTK arguments and "
+                                   "function arguments for a signal "
+                                   "don't seem to match"),line_no);
+       }
        node = new_method(scope,type,oid,gtktypes,id,funcargs,
                          onerror,cbuf,line_no,ccode_line,vararg);
        gtktypes = NULL;