Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
andreas-schwab committed Nov 14, 2023
commit 608ee2dc89e59ea1c287544bc0cb8d9d681232a9
3 changes: 1 addition & 2 deletions Modules/_ctypes/callproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down