Commit eed2064a authored by Robert Bradshaw's avatar Robert Bradshaw Committed by GitHub

Merge pull request #2679 from robertwb/long-internals-mingw-fix

Workaround for long internals misconfiguration on 64-bit MinGW.
parents 443369fc 55861ed7
...@@ -246,6 +246,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -246,6 +246,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
h_code.put_generated_by() h_code.put_generated_by()
api_guard = Naming.api_guard_prefix + self.api_name(env) api_guard = Naming.api_guard_prefix + self.api_name(env)
h_code.put_h_guard(api_guard) h_code.put_h_guard(api_guard)
# Work around https://bugs.python.org/issue4709
h_code.putln('#ifdef __MINGW64__')
h_code.putln('#define MS_WIN64')
h_code.putln('#endif')
h_code.putln('#include "Python.h"') h_code.putln('#include "Python.h"')
if result.h_file: if result.h_file:
h_code.putln('#include "%s"' % os.path.basename(result.h_file)) h_code.putln('#include "%s"' % os.path.basename(result.h_file))
......
...@@ -205,6 +205,10 @@ ...@@ -205,6 +205,10 @@
#undef SHIFT #undef SHIFT
#undef BASE #undef BASE
#undef MASK #undef MASK
/* Compile-time sanity check that these are indeed equal. Github issue #2670. */
#ifdef SIZEOF_VOID_P
enum { __pyx_check_sizeof_voidp = 1/(SIZEOF_VOID_P == sizeof(void*)) };
#endif
#endif #endif
#ifndef __has_attribute #ifndef __has_attribute
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment