2008-06-17 Jürg Billeter <j@bitron.ch>
* gobject/valaccodegenerator.vala:
Support duplicating errors
svn path=/trunk/; revision=1609
2008-06-17 Jürg Billeter <j@bitron.ch>
+ * gobject/valaccodegenerator.vala:
+
+ Support duplicating errors
+
+2008-06-17 Jürg Billeter <j@bitron.ch>
+
* vala/valasymbol.vala:
* gobject/valaccodeobjecttypesymbolbinding.vala:
public CCodeExpression? get_dup_func_expression (DataType type, SourceReference? source_reference) {
var cl = type.data_type as Class;
- if (type.data_type != null) {
+ if (type is ErrorType) {
+ return new CCodeIdentifier ("g_error_copy");
+ } else if (type.data_type != null) {
string dup_function;
if (type.data_type.is_reference_counting ()) {
dup_function = type.data_type.get_ref_function ();