generator: Make instance_offset as hiding inherited member

This commit is contained in:
Thibault Saunier 2017-09-25 21:22:22 -03:00 committed by Harry
parent 076971d622
commit d28c09d15e
2 changed files with 2 additions and 2 deletions

View file

@ -195,7 +195,7 @@ namespace GtkSharp.Generation {
if (cs_parent_struct == "")
sw.WriteLine ("\t\tpublic static uint instance_offset { get { return 0; }}");
else
sw.WriteLine ("\t\tpublic static uint instance_offset {{ get {{ return ((uint) Marshal.SizeOf(typeof ({0})) + {1}.instance_offset); }} }}", cs_parent_struct, cs_parent);
sw.WriteLine ("\t\tpublic static new uint instance_offset {{ get {{ return ((uint) Marshal.SizeOf(typeof ({0})) + {1}.instance_offset); }} }}", cs_parent_struct, cs_parent);
}
protected void GenerateStructureABI (GenerationInfo gen_info)

View file

@ -64,7 +64,7 @@ namespace GtkSharp.Generation {
if (cs_parent_struct == "")
sw.WriteLine ("\t\tpublic uint instance_offset { get { return 0; }}");
else
sw.WriteLine ("\t\tpublic override uint instance_offset {{ get {{ return ((uint) Marshal.SizeOf(typeof ({0})) + base.instance_offset); }} }}", cs_parent_struct);
sw.WriteLine ("\t\tpublic new uint instance_offset {{ get {{ return ((uint) Marshal.SizeOf(typeof ({0})) + base.instance_offset); }} }}", cs_parent_struct);
}
public override string DefaultValue {