2005-12-21 Lluis Sanchez Gual <lluis@novell.com>

* generator/FieldBase.cs: Properly convert marshalled value 
	to native value.
	* generator/CallbackGen.cs: Added parens to the result of ToNativeReturn,
	since it may have problems with the cast.


svn path=/trunk/gtk-sharp/; revision=54671
This commit is contained in:
Lluis Sanchez 2005-12-21 00:18:52 +00:00
parent 65ecbb1fb9
commit fe3b98a79b
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2005-12-21 Lluis Sanchez Gual <lluis@novell.com>
* generator/FieldBase.cs: Properly convert marshalled value
to native value.
* generator/CallbackGen.cs: Added parens to the result of ToNativeReturn,
since it may have problems with the cast.
2005-12-16 John Luke <john.luke@gmail.com>
* samples/CairoSample.cs:

View File

@ -159,7 +159,7 @@ namespace GtkSharp.Generation {
} else if (table.IsEnum (retval.CType))
sw.WriteLine ("(int) {0};", invoke);
else
sw.WriteLine ("({0}) {1};", retval.MarshalType, table.ToNativeReturn (retval.CType, invoke));
sw.WriteLine ("({0}) ({1});", retval.MarshalType, table.ToNativeReturn (retval.CType, invoke));
} else
sw.WriteLine (invoke + ";");

View File

@ -195,7 +195,7 @@ namespace GtkSharp.Generation {
sw.WriteLine (indent + "\t\t\t*raw_ptr = value;");
} else {
sw.WriteLine (indent + "\t\t\t" + table.GetMarshalReturnType (CType) + "* raw_ptr = (" + table.GetMarshalReturnType (CType) + "*)(((byte*)" + container_type.CallByName () + ") + " + offsetName + ");");
sw.WriteLine (indent + "\t\t\t*raw_ptr = " + table.CallByName (ctype, "value") + ";");
sw.WriteLine (indent + "\t\t\t*raw_ptr = " + table.ToNativeReturn (ctype, "value") + ";");
}
sw.WriteLine (indent + "\t\t}");
sw.WriteLine (indent + "\t}");