Fixed the mapping between unsigned and signed wrappers -> entry points (no unsigned <-> signed casting). Regenerated bindings.

This commit is contained in:
the_fiddler 2009-03-08 19:19:52 +00:00
parent 57a26d434c
commit a29c32d774
4 changed files with 7846 additions and 7836 deletions

View file

@ -498,10 +498,6 @@ namespace Bind.Structures
fixed_statements.Clear(); fixed_statements.Clear();
assign_statements.Clear(); assign_statements.Clear();
if (f.Name == "TessVertex")
{
}
// Obtain pointers by pinning the parameters // Obtain pointers by pinning the parameters
foreach (Parameter p in f.Parameters) foreach (Parameter p in f.Parameters)
{ {
@ -730,13 +726,12 @@ namespace Bind.Structures
} }
/// <summary> /// <summary>
/// Adds the function to the collection, if a function with the same /// Adds the function to the collection, if a function with the same name and parameters doesn't already exist.
/// name and parameters doesn't already exist.
/// </summary> /// </summary>
/// <param name="f">The Function to add.</param> /// <param name="f">The Function to add.</param>
public void AddChecked(Function f) public void AddChecked(Function f)
{ {
if (f.Name.Contains("Bitmap")) if (f.Name.Contains("Uniform1u"))
{ {
} }
@ -747,16 +742,6 @@ namespace Bind.Structures
{ {
Bind.Structures.Function.Wrappers.Add(f); Bind.Structures.Function.Wrappers.Add(f);
} }
else
{
if (unsignedFunctions.IsMatch(Utilities.StripGL2Extension(f.Name)))// &&
//!unsignedFunctions.IsMatch(
// Utilities.StripGL2Extension(Bind.Structures.Function.Wrappers[f.Extension][index].Name)))
{
Bind.Structures.Function.Wrappers[f.Extension].RemoveAt(index);
Bind.Structures.Function.Wrappers[f.Extension].Add(f);
}
}
} }
else else
{ {

View file

@ -71,7 +71,7 @@ namespace Bind.Structures
#endregion #endregion
#region UnmanagedType property #region UnmanagedType
UnmanagedType _unmanaged_type; UnmanagedType _unmanaged_type;
/// <summary> /// <summary>
@ -174,11 +174,15 @@ namespace Bind.Structures
#endregion #endregion
#region public override string ToString()
public override string ToString() public override string ToString()
{ {
return ToString(false); return ToString(false);
} }
#endregion
#region public string ToString(bool override_unsafe_setting) #region public string ToString(bool override_unsafe_setting)
public string ToString(bool override_unsafe_setting) public string ToString(bool override_unsafe_setting)
@ -294,6 +298,7 @@ namespace Bind.Structures
private bool rebuild = true; private bool rebuild = true;
bool hasPointerParameters; bool hasPointerParameters;
bool hasReferenceParameters; bool hasReferenceParameters;
bool hasUnsignedParameters;
bool unsafe_types_allowed; bool unsafe_types_allowed;
public bool Rebuild public bool Rebuild
{ {
@ -335,15 +340,10 @@ namespace Bind.Structures
{ {
get get
{ {
if (!rebuild) if (Rebuild)
{
return hasPointerParameters;
}
else
{
BuildCache(); BuildCache();
return hasPointerParameters;
} return hasPointerParameters;
} }
} }
@ -355,15 +355,25 @@ namespace Bind.Structures
{ {
get get
{ {
if (!Rebuild) if (Rebuild)
{
return hasReferenceParameters;
}
else
{
BuildCache(); BuildCache();
return hasReferenceParameters;
} return hasReferenceParameters;
}
}
#endregion
#region public bool HasUnsignedParameters
public bool HasUnsignedParameters
{
get
{
if (Rebuild)
BuildCache();
return hasUnsignedParameters;
} }
} }
@ -380,6 +390,9 @@ namespace Bind.Structures
if (p.Reference) if (p.Reference)
hasReferenceParameters = true; hasReferenceParameters = true;
if (p.Unsigned)
hasUnsignedParameters = true;
} }
} }

View file

@ -155,7 +155,7 @@ namespace Bind.Structures
{ {
get get
{ {
bool compliant = !(CurrentType.Contains("UInt") || CurrentType.Contains("SByte")); bool compliant = !Unsigned;
if (Pointer) if (Pointer)
{ {
compliant &= CurrentType.Contains("IntPtr"); // IntPtr's are CLSCompliant. compliant &= CurrentType.Contains("IntPtr"); // IntPtr's are CLSCompliant.
@ -183,6 +183,18 @@ namespace Bind.Structures
#endregion #endregion
#region public bool Unsigned
public bool Unsigned
{
get
{
return (CurrentType.Contains("UInt") || CurrentType.Contains("SByte"));
}
}
#endregion
#region public WrapperTypes WrapperType #region public WrapperTypes WrapperType
private WrapperTypes _wrapper_type = WrapperTypes.None; private WrapperTypes _wrapper_type = WrapperTypes.None;

File diff suppressed because it is too large Load diff