Commit dc8db285 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

support weak keyword in local variable declarations improve GError support

2007-03-16  Jürg Billeter  <j@bitron.ch>

	* vala/parser.y: support weak keyword in local variable declarations
	* vapi/glib-2.0.vala: improve GError support

svn path=/trunk/; revision=238
parent a256eeb5
2007-03-16 Jürg Billeter <j@bitron.ch>
* vala/parser.y: support weak keyword in local variable declarations
* vapi/glib-2.0.vala: improve GError support
2007-03-16 Jürg Billeter <j@bitron.ch>
* vala/valacodegenerator.vala: support disconnecting signals, based on
......
......@@ -1434,6 +1434,16 @@ local_variable_type
vala_type_reference_set_non_null ($$, TRUE);
}
}
| WEAK primary_expression opt_op_neg
{
ValaSourceReference *src = src(@2);
$$ = vala_type_reference_new_from_expression ($2);
g_object_unref ($2);
g_object_unref (src);
if ($3) {
vala_type_reference_set_non_null ($$, TRUE);
}
}
;
opt_op_neg
......
......@@ -625,8 +625,9 @@ namespace GLib {
/* Error Reporting */
[ReferenceType ()]
[ReferenceType (dup_function = "g_error_copy", free_function = "g_error_free")]
public struct Error {
public Error (Quark domain, int code, string! format, ...);
public int code;
public string message;
}
......
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