prep_cif.c: Remove unnecessary ifdef for X86_WIN32
authorJosh Triplett <josh@joshtriplett.org>
Sun, 16 Mar 2014 08:50:02 +0000 (01:50 -0700)
committerJosh Triplett <josh@joshtriplett.org>
Sun, 16 Mar 2014 11:56:57 +0000 (04:56 -0700)
ffi_prep_cif_core had a special case for X86_WIN32, checking for
FFI_THISCALL in addition to the FFI_FIRST_ABI-to-FFI_LAST_ABI range
before returning FFI_BAD_ABI.  However, on X86_WIN32, FFI_THISCALL
already falls in that range, making the special case unnecessary.
Remove it.

ChangeLog
src/prep_cif.c

index 58508299d790a329db9d3cedd9c3fc240e85dea9..627844ce34f83b1624b5f3efd270934b9f720c17 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-03-16  Josh Triplett <josh@joshtriplett.org>
+
+       * prep_cif.c: Remove unnecessary ifdef for X86_WIN32.
+       ffi_prep_cif_core had a special case for X86_WIN32, checking for
+       FFI_THISCALL in addition to the FFI_FIRST_ABI-to-FFI_LAST_ABI range
+       before returning FFI_BAD_ABI.  However, on X86_WIN32, FFI_THISCALL
+       already falls in that range, making the special case unnecessary.
+       Remove it.
+
 2014-03-16  Josh Triplett <josh@joshtriplett.org>
 
        * testsuite/libffi.call/closure_stdcall.c,
index e216ef0b891c71fe5aec72e56ab15a52b746ff6b..55ceed8c5e705e1dae7e12d177d884be6db61fa8 100644 (file)
@@ -118,13 +118,8 @@ ffi_status FFI_HIDDEN ffi_prep_cif_core(ffi_cif *cif, ffi_abi abi,
   FFI_ASSERT((!isvariadic) || (nfixedargs >= 1));
   FFI_ASSERT(nfixedargs <= ntotalargs);
 
-#ifndef X86_WIN32
   if (! (abi > FFI_FIRST_ABI && abi < FFI_LAST_ABI))
     return FFI_BAD_ABI;
-#else
-  if (! (abi > FFI_FIRST_ABI && abi < FFI_LAST_ABI || abi == FFI_THISCALL))
-    return FFI_BAD_ABI;
-#endif
 
   cif->abi = abi;
   cif->arg_types = atypes;