* FuncProcessor.cs:

* Structures/Parameter.cs: Avoid qualifying IntPtr fully ((a) it's
  unnecessary, since we have "using System;" already and (b) the
  namespace qualification is not portable to C++).
This commit is contained in:
the_fiddler 2010-12-05 15:53:04 +00:00
parent 82ba7143bb
commit 177813e47a
2 changed files with 4 additions and 4 deletions

View file

@ -150,19 +150,19 @@ namespace Bind
if (d.ReturnType.CurrentType.ToLower().Contains("void") && d.ReturnType.Pointer != 0) if (d.ReturnType.CurrentType.ToLower().Contains("void") && d.ReturnType.Pointer != 0)
{ {
d.ReturnType.QualifiedType = "System.IntPtr"; d.ReturnType.QualifiedType = "IntPtr";
d.ReturnType.WrapperType = WrapperTypes.GenericReturnType; d.ReturnType.WrapperType = WrapperTypes.GenericReturnType;
} }
if (d.ReturnType.CurrentType.ToLower().Contains("string")) if (d.ReturnType.CurrentType.ToLower().Contains("string"))
{ {
d.ReturnType.QualifiedType = "System.IntPtr"; d.ReturnType.QualifiedType = "IntPtr";
d.ReturnType.WrapperType = WrapperTypes.StringReturnType; d.ReturnType.WrapperType = WrapperTypes.StringReturnType;
} }
if (d.ReturnType.CurrentType.ToLower() == "object") if (d.ReturnType.CurrentType.ToLower() == "object")
{ {
d.ReturnType.QualifiedType = "System.IntPtr"; d.ReturnType.QualifiedType = "IntPtr";
d.ReturnType.WrapperType |= WrapperTypes.GenericReturnType; d.ReturnType.WrapperType |= WrapperTypes.GenericReturnType;
} }

View file

@ -610,7 +610,7 @@ namespace Bind.Structures
{ {
if (((Settings.Compatibility & Settings.Legacy.TurnVoidPointersToIntPtr) != Settings.Legacy.None) && if (((Settings.Compatibility & Settings.Legacy.TurnVoidPointersToIntPtr) != Settings.Legacy.None) &&
p.Pointer != 0 && p.CurrentType.Contains("void")) p.Pointer != 0 && p.CurrentType.Contains("void"))
sb.Append("(System.IntPtr)"); sb.Append("(IntPtr)");
else else
{ {
sb.Append("("); sb.Append("(");