Commit 2a00abc3 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

fix internal warnings on syntax errors

2007-09-01  Juerg Billeter  <j@bitron.ch>

	* vala/parser.y: fix internal warnings on syntax errors

svn path=/trunk/; revision=569
parent 9855cf90
2007-09-01 Jürg Billeter <j@bitron.ch>
* vala/parser.y: fix internal warnings on syntax errors
2007-09-01 Jürg Billeter <j@bitron.ch>
* vapi/curses.vala: use subtyping, patch by Ed Schouten
......
......@@ -763,8 +763,12 @@ invocation_expression
if ($3 != NULL) {
GList *l;
for (l = $3; l != NULL; l = l->next) {
vala_invocation_expression_add_argument (VALA_INVOCATION_EXPRESSION ($$), l->data);
g_object_unref (l->data);
if (l->data == NULL) {
// error in subexpression
} else {
vala_invocation_expression_add_argument (VALA_INVOCATION_EXPRESSION ($$), l->data);
g_object_unref (l->data);
}
}
g_list_free ($3);
}
......@@ -778,8 +782,12 @@ element_access
ValaSourceReference *src = src(@1);
$$ = VALA_EXPRESSION (vala_element_access_new ($1, src));
for (l = $3; l != NULL; l = l->next) {
vala_element_access_append_index (VALA_ELEMENT_ACCESS ($$), VALA_EXPRESSION (l->data));
g_object_unref (l->data);
if (l->data == NULL) {
// error in subexpression
} else {
vala_element_access_append_index (VALA_ELEMENT_ACCESS ($$), VALA_EXPRESSION (l->data));
g_object_unref (l->data);
}
}
g_list_free ($3);
g_object_unref ($1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment