Skip to content

Commit

Permalink
[generator] Remove check for third party bindings in native enums in …
Browse files Browse the repository at this point in the history
…[Field] (xamarin#2233)

This also happens in our bindings once pmcs is done
  • Loading branch information
dalexsoto authored and rolfbjarne committed Jun 21, 2017
1 parent 1d1862c commit 08614af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6082,9 +6082,9 @@ public void Generate (Type type)
indent--;
print ($"return {smartEnumTypeName}Extensions.GetValue (_{field_pi.Name});");
} else if (UnifiedAPI && IsNativeEnum (field_pi.PropertyType)) {
if (btype == TypeManager.System_nint || (BindThirdPartyLibrary && btype == TypeManager.System_Int64))
if (btype == TypeManager.System_nint || btype == TypeManager.System_Int64)
print ($"return ({fieldTypeName}) (long) Dlfcn.GetNInt (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\");" );
else if (btype == TypeManager.System_nuint || (BindThirdPartyLibrary && btype == TypeManager.System_UInt64))
else if (btype == TypeManager.System_nuint || btype == TypeManager.System_UInt64)
print ($"return ({fieldTypeName}) (ulong) Dlfcn.GetNUInt (Libraries.{library_name}.Handle, \"{fieldAttr.SymbolName}\");");
else
throw new BindingException (1014, true, "Unsupported type for Fields: {0}", fieldTypeName);
Expand Down

0 comments on commit 08614af

Please sign in to comment.