8000 Fix two "return" issues in x86/ffi64.c (#431) · python/cpython-source-deps@4c2206a · GitHub
[go: up one dir, main page]

Skip to content

Commit 4c2206a

Browse files
tromeyatgreen
authored andcommitted
Fix two "return" issues in x86/ffi64.c (#431)
Issue #70 pointed out that at least one compiler didn't like: return ffi_call_efi64(cif, fn, rvalue, avalue); ... where the return type is "void". This patch splits the statement into two. I also noticed that ffi_call_go here seems to do a double call. I suspect a "return" is missing here, so this patch adds it as well.
1 parent ed3ed4d commit 4c2206a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/x86/ffi64.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,10 @@ ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
678678
{
679679
#ifndef __ILP32__
680680
if (cif->abi == FFI_EFI64)
681-
return ffi_call_efi64(cif, fn, rvalue, avalue);
681+
{
682+
ffi_call_efi64(cif, fn, rvalue, avalue);
683+
return;
684+
}
682685
#endif
683686
ffi_call_int (cif, fn, rvalue, avalue, NULL);
684687
}
@@ -695,7 +698,10 @@ ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue,
695698
{
696699
#ifndef __ILP32__
697700
if (cif->abi == FFI_EFI64)
698-
ffi_call_go_efi64(cif, fn, rvalue, avalue, closure);
701+
{
702+
ffi_call_go_efi64(cif, fn, rvalue, avalue, closure);
703+
return;
704+
}
699705
#endif
700706
ffi_call_int (cif, fn, rvalue, avalue, closure);
701707
}

0 commit comments

Comments
 (0)
0