[pypy-commit] pypy default: merge

fijal noreply at buildbot.pypy.org
Tue Jun 7 16:40:49 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r44793:3857e9349336
Date: 2011-06-07 16:41 +0200
http://bitbucket.org/pypy/pypy/changeset/3857e9349336/

Log:	merge

diff --git a/pypy/rlib/longlong2float.py b/pypy/rlib/longlong2float.py
--- a/pypy/rlib/longlong2float.py
+++ b/pypy/rlib/longlong2float.py
@@ -30,15 +30,17 @@
     return llval
 
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
-eci = ExternalCompilationInfo(includes=['string.h'],
+eci = ExternalCompilationInfo(includes=['string.h', 'assert.h'],
                               post_include_bits=["""
 static double pypy__longlong2float(long long x) {
     double dd;
+    assert(sizeof(double) == 8 && sizeof(long long) == 8);
     memcpy(&dd, &x, 8);
     return dd;
 }
 static long long pypy__float2longlong(double x) {
     long long ll;
+    assert(sizeof(double) == 8 && sizeof(long long) == 8);
     memcpy(&ll, &x, 8);
     return ll;
 }


More information about the pypy-commit mailing list