Author: Richard Plangger <planri...@gmail.com>
Branch: 
Changeset: r85867:2b292dbd9644
Date: 2016-07-25 22:05 +0200
http://bitbucket.org/pypy/pypy/changeset/2b292dbd9644/

Log:    merge jitlog-32bit

diff --git a/rpython/rlib/rjitlog/rjitlog.py b/rpython/rlib/rjitlog/rjitlog.py
--- a/rpython/rlib/rjitlog/rjitlog.py
+++ b/rpython/rlib/rjitlog/rjitlog.py
@@ -92,7 +92,12 @@
 
 @always_inline
 def encode_str(string):
-    return encode_le_32bit(len(string)) + string
+    val = len(string)
+    return ''.join([chr((val >> 0) & 0xff),
+                    chr((val >> 8) & 0xff),
+                    chr((val >> 16) & 0xff),
+                    chr((val >> 24) & 0xff),
+                    string])
 
 @always_inline
 def encode_le_16bit(val):
@@ -131,7 +136,7 @@
     elif type == "i":
         return encode_le_32bit(value)
     elif type == "h":
-        return encode_le_32bit(value)
+        return encode_le_16bit(value)
     else:
         raise NotImplementedError
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to