2008-09-18 Mike Kestner <mkestner@novell.com>
* generator/LPGen.cs: remove WIN64LONGS hackery. * generator/LPUGen.cs: remove WIN64LONGS hackery. * generator/SymbolTable.cs: for WIN64LONGS, map them directly to (u)int SimpleGens instead of using the LP generatables. svn path=/trunk/gtk-sharp/; revision=113420
This commit is contained in:
parent
76c808b7cb
commit
667b1462d6
4 changed files with 20 additions and 27 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-09-18 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* generator/LPGen.cs: remove WIN64LONGS hackery.
|
||||
* generator/LPUGen.cs: remove WIN64LONGS hackery.
|
||||
* generator/SymbolTable.cs: for WIN64LONGS, map them directly to
|
||||
(u)int SimpleGens instead of using the LP generatables.
|
||||
|
||||
2008-09-16 Jeffrey Stedfast <fejj@novell.com>
|
||||
|
||||
* generator/Property.cs (IsDeprecated): Allow "1" or "true".
|
||||
|
|
|
@ -30,30 +30,18 @@ namespace GtkSharp.Generation {
|
|||
|
||||
public override string MarshalType {
|
||||
get {
|
||||
#if WIN64LONGS
|
||||
return "int";
|
||||
#else
|
||||
return "IntPtr";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public override string CallByName (string var_name)
|
||||
{
|
||||
#if WIN64LONGS
|
||||
return "(int) " + var_name;
|
||||
#else
|
||||
return "new IntPtr (" + var_name + ")";
|
||||
#endif
|
||||
}
|
||||
|
||||
public override string FromNative(string var)
|
||||
{
|
||||
#if WIN64LONGS
|
||||
return var;
|
||||
#else
|
||||
return "(long) " + var;
|
||||
#endif
|
||||
}
|
||||
|
||||
public void WriteAccessors (StreamWriter sw, string indent, string var)
|
||||
|
|
|
@ -30,30 +30,18 @@ namespace GtkSharp.Generation {
|
|||
|
||||
public override string MarshalType {
|
||||
get {
|
||||
#if WIN64LONGS
|
||||
return "uint";
|
||||
#else
|
||||
return "UIntPtr";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public override string CallByName (string var_name)
|
||||
{
|
||||
#if WIN64LONGS
|
||||
return "(uint) " + var_name;
|
||||
#else
|
||||
return "new UIntPtr (" + var_name + ")";
|
||||
#endif
|
||||
}
|
||||
|
||||
public override string FromNative(string var)
|
||||
{
|
||||
#if WIN64LONGS
|
||||
return var;
|
||||
#else
|
||||
return "(ulong) " + var;
|
||||
#endif
|
||||
}
|
||||
|
||||
public void WriteAccessors (StreamWriter sw, string indent, string var)
|
||||
|
|
|
@ -77,15 +77,25 @@ namespace GtkSharp.Generation {
|
|||
AddType (new SimpleGen ("GQuark", "int", "0"));
|
||||
|
||||
// platform specific integer types.
|
||||
AddType (new LPGen ("ssize_t"));
|
||||
#if WIN64LONGS
|
||||
AddType (new SimpleGen ("long", "int", "0"));
|
||||
AddType (new SimpleGen ("glong", "int", "0"));
|
||||
AddType (new SimpleGen ("ulong", "uint", "0"));
|
||||
AddType (new SimpleGen ("gulong", "uint", "0"));
|
||||
AddType (new SimpleGen ("unsigned long", "uint", "0"));
|
||||
#else
|
||||
AddType (new LPGen ("long"));
|
||||
AddType (new LPGen ("glong"));
|
||||
AddType (new LPGen ("gssize"));
|
||||
AddType (new LPUGen ("size_t"));
|
||||
AddType (new LPUGen ("ulong"));
|
||||
AddType (new LPUGen ("gulong"));
|
||||
AddType (new LPUGen ("unsigned long"));
|
||||
#endif
|
||||
|
||||
AddType (new LPGen ("ssize_t"));
|
||||
AddType (new LPGen ("gssize"));
|
||||
AddType (new LPUGen ("size_t"));
|
||||
AddType (new LPUGen ("gsize"));
|
||||
|
||||
#if OFF_T_8
|
||||
AddType (new AliasGen ("off_t", "long"));
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue