[Python-checkins] cpython (merge 3.3 -> default): Fix compilation error under gcc of the ctypes module bundled libffi for arm.

gregory.p.smith python-checkins at python.org
Sun Nov 17 22:58:11 CET 2013


http://hg.python.org/cpython/rev/0fbdff3fde3a
changeset:   87223:0fbdff3fde3a
parent:      87220:6049c954a703
parent:      87222:5e71f5cfd233
user:        Gregory P. Smith <greg at krypto.org>
date:        Sun Nov 17 21:57:43 2013 +0000
summary:
  Fix compilation error under gcc of the ctypes module bundled libffi for arm.
A variable was declared below the top of a block and one function was using
a K&R C style function declaration!

files:
  Misc/NEWS                            |   2 ++
  Modules/_ctypes/libffi/src/arm/ffi.c |  14 +++++++-------
  2 files changed, 9 insertions(+), 7 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -50,6 +50,8 @@
 Library
 -------
 
+- Fix compilation error under gcc of the ctypes module bundled libffi for arm.
+
 - Issue #19448: Add private API to SSL module to lookup ASN.1 objects by OID,
   NID, short name and long name.
 
diff --git a/Modules/_ctypes/libffi/src/arm/ffi.c b/Modules/_ctypes/libffi/src/arm/ffi.c
--- a/Modules/_ctypes/libffi/src/arm/ffi.c
+++ b/Modules/_ctypes/libffi/src/arm/ffi.c
@@ -221,11 +221,11 @@
   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 @@
 /* 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;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list