From 608ee2dc89e59ea1c287544bc0cb8d9d681232a9 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 11 Apr 2023 11:34:57 +0200 Subject: [PATCH] gh-103438: Don't define CTYPES_PASS_BY_REF_HACK on aarch64 or riscv64 This was a workaround for a bug in libffi that has been fixed. --- Modules/_ctypes/callproc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 3b11cd7f58ce4b..6c8ac813ed6194 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -1139,8 +1139,7 @@ GetComError(HRESULT errcode, GUID *riid, IUnknown *pIunk) } #endif -#if (defined(__x86_64__) && (defined(__MINGW64__) || defined(__CYGWIN__))) || \ - defined(__aarch64__) || defined(__riscv) +#if (defined(__x86_64__) && (defined(__MINGW64__) || defined(__CYGWIN__))) #define CTYPES_PASS_BY_REF_HACK #define POW2(x) (((x & ~(x - 1)) == x) ? x : 0) #define IS_PASS_BY_REF(x) (x > 8 || !POW2(x))