[pypy-dev] Changing the default magic number

Armin Rigo arigo at tunes.org
Mon Jul 14 17:27:28 CEST 2008


Hi,

On Thu, Jul 10, 2008 at 11:15:36AM -0300, Bruno Gola wrote:
> I think we could change these value to the 2.5 one. I think it will
> not affect anything (only these opcodes that we are changing as well).

I believe that we are still trying to get code objects compiled by the
underlying Python to run in PyPy.  This is a case where the magic number
in the PyCode can be different: it's used to know if we need to emulate
the 2.4 or 2.5 behavior, depending on the underlying Python's version
number.  It would be a bit of a mess to remove this hack, though.  For
example the flow object space looks at the regular Python function
object's func_code, turned into PyCode, so it must be able to accept
PyCode objects that come from the underlying Python's compiler...


A bientot,

Armin.



More information about the Pypy-dev mailing list