diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-01-29 13:11:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-29 13:11:36 -0800 |
commit | 10354cbb5067b4719ba1c2d51d22314a644ed3e5 (patch) | |
tree | 7f5adb4acdc9b65c4220ea7bcf9679ed7e02de2f /Modules/_ctypes | |
parent | ff27f8145d7194fb3891b610443dee15be8f8f63 (diff) | |
download | cpython-git-10354cbb5067b4719ba1c2d51d22314a644ed3e5.tar.gz |
bpo-35847: RISC-V needs CTYPES_PASS_BY_REF_HACK (GH-11694)
This fixes the ctypes.test.test_structures.StructureTestCase test.
https://bugs.python.org/issue35847
(cherry picked from commit 742d768656512a469ce9571b1cbd777def7bc5ea)
Co-authored-by: Andreas Schwab <schwab@linux-m68k.org>
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r-- | Modules/_ctypes/callproc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index ec596b4de3..e971388f69 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -1052,7 +1052,7 @@ GetComError(HRESULT errcode, GUID *riid, IUnknown *pIunk) #endif #if (defined(__x86_64__) && (defined(__MINGW64__) || defined(__CYGWIN__))) || \ - defined(__aarch64__) + defined(__aarch64__) || defined(__riscv) #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)) |