[pypy-svn] r20092 - pypy/dist/pypy/rpython
arigo at codespeak.net
arigo at codespeak.net
Sat Nov 19 20:42:13 CET 2005
Author: arigo
Date: Sat Nov 19 20:42:12 2005
New Revision: 20092
Modified:
pypy/dist/pypy/rpython/robject.py
Log:
Bug fix (for Christian :-) to compile code like
d = {}
d[x] = y
where x and y are SomeObjects. The reason is that operations manipulating
PyObjects must not have a 'void' return value, even operations like 'setitem',
but a PyObject one.
Modified: pypy/dist/pypy/rpython/robject.py
==============================================================================
--- pypy/dist/pypy/rpython/robject.py (original)
+++ pypy/dist/pypy/rpython/robject.py Sat Nov 19 20:42:12 2005
@@ -53,10 +53,8 @@
def rtype_op(_, hop):
vlist = hop.inputargs(*([pyobj_repr]*hop.nb_args))
hop.exception_is_here()
- if isinstance(hop.r_result, VoidRepr):
- hop.genop(opname, vlist)
- else:
- v = hop.genop(opname, vlist, resulttype=pyobj_repr)
+ v = hop.genop(opname, vlist, resulttype=pyobj_repr)
+ if not isinstance(hop.r_result, VoidRepr):
return hop.llops.convertvar(v, pyobj_repr, hop.r_result)
funcname = 'rtype_' + opname
More information about the Pypy-commit
mailing list