Author: mattip <[email protected]>
Branch: win32-fixes5
Changeset: r73671:b878317fc5f0
Date: 2014-09-24 16:30 +0300
http://bitbucket.org/pypy/pypy/changeset/b878317fc5f0/

Log:    force 4 byte alignment on windows

diff --git a/rpython/rtyper/tool/rffi_platform.py 
b/rpython/rtyper/tool/rffi_platform.py
--- a/rpython/rtyper/tool/rffi_platform.py
+++ b/rpython/rtyper/tool/rffi_platform.py
@@ -107,15 +107,18 @@
     fields is properly aligned."""
     global _memory_alignment
     if _memory_alignment is None:
-        S = getstruct('struct memory_alignment_test', """
-           struct memory_alignment_test {
-               double d;
-               void* p;
-           };
-        """, [])
-        result = S._hints['align']
-        assert result & (result-1) == 0, "not a power of two??"
-        _memory_alignment = result
+        if sys.platform == 'win32':
+            _memory_alignment = 4
+        else:    
+            S = getstruct('struct memory_alignment_test', """
+               struct memory_alignment_test {
+                   double d;
+                   void* p;
+               };
+            """, [])
+            result = S._hints['align']
+            assert result & (result-1) == 0, "not a power of two??"
+            _memory_alignment = result
     return _memory_alignment
 _memory_alignment = None
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to