X-Git-Url: http://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/3379dcdfd0872947d761053c61d773add94d38c2..dd11885aadcfaafae2d6268c381b0aac94cbc149:/src/parse.y diff --git a/src/parse.y b/src/parse.y index 192e4c4..0161aea 100644 --- a/src/parse.y +++ b/src/parse.y @@ -137,11 +137,22 @@ push_function(int scope, int method, char *oid, char *id, g_list_length(gtktypes) != g_list_length(funcargs) && !(g_list_length(funcargs) == 1 && g_list_length(gtktypes) == 2 && - strcmp(gtktypes->next->data,"NONE")==0)) { + 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); } + if(g_list_length(gtktypes) > 2) { + GList *li; + for(li = gtktypes->next; li; li = li->next) { + if(strcmp(li->data, "NONE")==0) { + print_error(FALSE, + _("NONE can only appear in an " + "argument list by itself"), + line_no); + } + } + } if(cbuf) { char *p; c_cbuf = p = cbuf->str;