Commit 5207f35a authored by Levi Bard's avatar Levi Bard Committed by Jürg Billeter

Move delegate typedef to right position

Fixes bug 580513.
parent 63b56c13
......@@ -105,9 +105,9 @@ internal class Vala.CCodeDelegateModule : CCodeArrayModule {
var ctypedef = new CCodeTypeDefinition (return_type_cname, cfundecl);
if (d.source_reference != null && d.source_reference.comment != null) {
decl_space.add_type_declaration (new CCodeComment (d.source_reference.comment));
decl_space.add_type_definition (new CCodeComment (d.source_reference.comment));
}
decl_space.add_type_declaration (ctypedef);
decl_space.add_type_definition (ctypedef);
}
public override void visit_delegate (Delegate d) {
......
......@@ -3,6 +3,8 @@ Program: test
using GLib;
public enum ParameterEnum { FOO, BAR }
public static delegate void Maman.VoidCallback ();
public static delegate int Maman.ActionCallback ();
......@@ -10,6 +12,8 @@ public static delegate int Maman.ActionCallback ();
public delegate void Maman.InstanceCallback (int i);
public delegate Maman.SelfCallback Maman.SelfCallback (Maman.SelfCallback scb);
public delegate ParameterEnum Maman.EnumDelegate (ParameterEnum pe);
struct Maman.DelegateStruct {
public VoidCallback callback;
}
......
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