Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7929a1d

Browse files
committed
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!
1 parent 76edd21 commit 7929a1d

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Core and Builtins
1313
Library
1414
-------
1515

16+
- Fix compilation error under gcc of the ctypes module bundled libffi for arm.
17+
1618
- Issue #19523: Closed FileHandler leak which occurred when delay was set.
1719

1820
- Issue #13674: Prevented time.strftime from crashing on Windows when given

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,11 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
221221
int vfp_struct = (cif->flags == FFI_TYPE_STRUCT_VFP_FLOAT
222222
|| cif->flags == FFI_TYPE_STRUCT_VFP_DOUBLE);
223223

224+
unsigned int temp;
225+
224226
ecif.cif = cif;
225227
ecif.avalue = avalue;
226228

227-
unsigned int temp;
228-
229229
/* If the return value is a struct and we don't have a return */
230230
/* value address then we need to make one */
231231

@@ -278,11 +278,11 @@ void ffi_closure_VFP (ffi_closure *);
278278
/* This function is jumped to by the trampoline */
279279

280280
unsigned int
281-
ffi_closure_SYSV_inner (closure, respp, args, vfp_args)
282-
ffi_closure *closure;
283-
void **respp;
284-
void *args;
285-
void *vfp_args;
281+
ffi_closure_SYSV_inner(
282+
ffi_closure *closure,
283+
void **respp,
284+
void *args,
285+
void *vfp_args)
286286
{
287287
// our various things...
288288
ffi_cif *cif;

0 commit comments

Comments
 (0)