mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-23 17:31:16 +00:00
2007-12-12 Mike Kestner <mkestner@novell.com>
* generator/Parameters.cs: fix marshaling for ArrayCount params where casting is required, like gsize/size_t count parameters. svn path=/trunk/gtk-sharp/; revision=91199
This commit is contained in:
parent
778f049caa
commit
57c664572c
|
@ -1,3 +1,8 @@
|
|||
2007-12-12 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* generator/Parameters.cs: fix marshaling for ArrayCount params where
|
||||
casting is required, like gsize/size_t count parameters.
|
||||
|
||||
2007-12-11 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* parser/gapi2xml.pl: fix tightloop in single-line prop declarations.
|
||||
|
|
|
@ -394,6 +394,12 @@ namespace GtkSharp.Generation {
|
|||
this.invert = invert;
|
||||
}
|
||||
|
||||
string CountNativeType {
|
||||
get {
|
||||
return SymbolTable.Table.GetMarshalType(count_elem.GetAttribute("type"));
|
||||
}
|
||||
}
|
||||
|
||||
string CountType {
|
||||
get {
|
||||
return SymbolTable.Table.GetCSType(count_elem.GetAttribute("type"));
|
||||
|
@ -417,8 +423,7 @@ namespace GtkSharp.Generation {
|
|||
|
||||
string CallCount (string name)
|
||||
{
|
||||
string result = name + " == null ? 0 : ";
|
||||
result += CountCast + name + ".Length";
|
||||
string result = CountCast + "(" + name + " == null ? 0 : " + name + ".Length)";
|
||||
IGeneratable gen = SymbolTable.Table[count_elem.GetAttribute("type")];
|
||||
return gen.CallByName (result);
|
||||
}
|
||||
|
@ -435,9 +440,9 @@ namespace GtkSharp.Generation {
|
|||
public override string NativeSignature {
|
||||
get {
|
||||
if (invert)
|
||||
return CountType + " " + CountName + ", " + MarshalType + " " + Name;
|
||||
return CountNativeType + " " + CountName + ", " + MarshalType + " " + Name;
|
||||
else
|
||||
return MarshalType + " " + Name + ", " + CountType + " " + CountName;
|
||||
return MarshalType + " " + Name + ", " + CountNativeType + " " + CountName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue