]> granicus.if.org Git - python/commitdiff
Fix compilation error under gcc of the ctypes module bundled libffi for arm.
authorGregory P. Smith <greg@krypto.org>
Sun, 17 Nov 2013 21:56:07 +0000 (21:56 +0000)
committerGregory P. Smith <greg@krypto.org>
Sun, 17 Nov 2013 21:56:07 +0000 (21:56 +0000)
A variable was declared below the top of a block and one function was using
a K&R C style function declaration!

Misc/NEWS
Modules/_ctypes/libffi/src/arm/ffi.c

index 4c0109dc30985a0d70ca978ec006e463db28a570..c30c6bc4def70ad082ac13139d0b023ec1d6ced5 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -13,6 +13,8 @@ Core and Builtins
 Library
 -------
 
+- Fix compilation error under gcc of the ctypes module bundled libffi for arm.
+
 - Issue #19523: Closed FileHandler leak which occurred when delay was set.
 
 - Issue #13674: Prevented time.strftime from crashing on Windows when given
index 3ccceb9a50811b5b8337cd16f55971043098dd66..7fd7f44c4d4cf7007617c0ba6207a454df3a3d9b 100644 (file)
@@ -221,11 +221,11 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
   int vfp_struct = (cif->flags == FFI_TYPE_STRUCT_VFP_FLOAT
                    || cif->flags == FFI_TYPE_STRUCT_VFP_DOUBLE);
 
+  unsigned int temp;
+  
   ecif.cif = cif;
   ecif.avalue = avalue;
 
-  unsigned int temp;
-  
   /* If the return value is a struct and we don't have a return        */
   /* value address then we need to make one                    */
 
@@ -278,11 +278,11 @@ void ffi_closure_VFP (ffi_closure *);
 /* This function is jumped to by the trampoline */
 
 unsigned int
-ffi_closure_SYSV_inner (closure, respp, args, vfp_args)
-     ffi_closure *closure;
-     void **respp;
-     void *args;
-     void *vfp_args;
+ffi_closure_SYSV_inner(
+     ffi_closure *closure,
+     void **respp,
+     void *args,
+     void *vfp_args)
 {
   // our various things...
   ffi_cif       *cif;