Author: Antonio Cuni <[email protected]>
Branch: gc-disable
Changeset: r95508:96498bace39f
Date: 2018-12-19 11:59 +0100
http://bitbucket.org/pypy/pypy/changeset/96498bace39f/
Log: encode the gc states in 16 bit instead of 32, to avoid messing with
unsigned constants on 32 bit
diff --git a/rpython/rlib/rgc.py b/rpython/rlib/rgc.py
--- a/rpython/rlib/rgc.py
+++ b/rpython/rlib/rgc.py
@@ -31,13 +31,13 @@
return _encode_states(1, 0)
def _encode_states(oldstate, newstate):
- return oldstate << 16 | newstate
+ return oldstate << 8 | newstate
def old_state(states):
- return (states & 0xFFFF0000) >> 16
+ return (states & 0xFF00) >> 8
def new_state(states):
- return states & 0xFFFF
+ return states & 0xFF
def is_done(states):
"""
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit