2009-06-08 Christian Hoff <christian_hoff@gmx.net>

* generator/Signal.cs: Fix indexing of the signal arguments array for
	"out" and "ref" parameters.  [Fixes #508572]

svn path=/trunk/gtk-sharp/; revision=135661
This commit is contained in:
Christian Hoff 2009-06-08 13:21:01 +00:00
parent 9d215affce
commit f84bc5f1ac
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2009-06-08 Christian Hoff <christian_hoff@gmx.net>
* generator/Signal.cs: Fix indexing of the signal arguments array for
"out" and "ref" parameters. [Fixes #508572]
2009-05-28 Aaron Bockover <abockover@novell.com>
* generator/EnumGen.cs: Fix enum generator to properly parse integer

View file

@ -179,9 +179,9 @@ namespace GtkSharp.Generation {
sw.WriteLine("\t\t\t\targs.Args[" + idx + "] = " + p.FromNative ("arg" + idx) + ";");
}
if (igen is StructBase && p.PassAs == "ref")
finish += "\t\t\t\tif (arg" + idx + " != IntPtr.Zero) System.Runtime.InteropServices.Marshal.StructureToPtr (args.Args[" + (idx-1) + "], arg" + idx + ", false);\n";
finish += "\t\t\t\tif (arg" + idx + " != IntPtr.Zero) System.Runtime.InteropServices.Marshal.StructureToPtr (args.Args[" + idx + "], arg" + idx + ", false);\n";
else if (p.PassAs != "")
finish += "\t\t\t\targ" + idx + " = " + igen.ToNativeReturn ("((" + p.CSType + ")args.Args[" + (idx - 1) + "])") + ";\n";
finish += "\t\t\t\targ" + idx + " = " + igen.ToNativeReturn ("((" + p.CSType + ")args.Args[" + idx + "])") + ";\n";
}
return finish;
}