[pypy-svn] r78230 - in pypy/branch/fast-forward/pypy: interpreter module/__builtin__ rlib
afa at codespeak.net
afa at codespeak.net
Fri Oct 22 23:54:13 CEST 2010
Author: afa
Date: Fri Oct 22 23:54:08 2010
New Revision: 78230
Modified:
pypy/branch/fast-forward/pypy/interpreter/pyopcode.py
pypy/branch/fast-forward/pypy/module/__builtin__/interp_classobj.py
pypy/branch/fast-forward/pypy/rlib/clibffi.py
Log:
Fixes after the merge
Modified: pypy/branch/fast-forward/pypy/interpreter/pyopcode.py
==============================================================================
--- pypy/branch/fast-forward/pypy/interpreter/pyopcode.py (original)
+++ pypy/branch/fast-forward/pypy/interpreter/pyopcode.py Fri Oct 22 23:54:08 2010
@@ -933,7 +933,6 @@
raise NotImplementedError("WITH_CLEANUP for CPython <= 2.4")
unroller = self.space.interpclass_w(w_unroller)
- w_exit = self.popvalue()
is_app_exc = (unroller is not None and
isinstance(unroller, SApplicationException))
if is_app_exc:
@@ -1375,7 +1374,8 @@
block_classes = {'SETUP_LOOP': LoopBlock,
'SETUP_EXCEPT': ExceptBlock,
'SETUP_FINALLY': FinallyBlock,
- 'SETUP_WITH': WithBlock}
+ 'SETUP_WITH': WithBlock,
+ }
### helpers written at the application-level ###
# Some of these functions are expected to be generally useful if other
Modified: pypy/branch/fast-forward/pypy/module/__builtin__/interp_classobj.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/__builtin__/interp_classobj.py (original)
+++ pypy/branch/fast-forward/pypy/module/__builtin__/interp_classobj.py Fri Oct 22 23:54:08 2010
@@ -2,7 +2,7 @@
from pypy.interpreter.error import OperationError, operationerrfmt
from pypy.interpreter.gateway import ObjSpace, W_Root, NoneNotWrapped, applevel
from pypy.interpreter.gateway import interp2app, ObjSpace
-from pypy.interpreter.typedef import TypeDef
+from pypy.interpreter.typedef import TypeDef, make_weakref_descr
from pypy.interpreter.argument import Arguments
from pypy.interpreter.baseobjspace import Wrappable
from pypy.interpreter.typedef import GetSetProperty, descr_get_dict
@@ -706,7 +706,7 @@
space.call_function(w_func)
def descr_exit(self, space, w_type, w_value, w_tb):
- w_func = self.getattr(space, space.wrap('__exit__'), False)
+ w_func = self.getattr(space, '__exit__', False)
if w_func is not None:
return space.call_function(w_func, w_type, w_value, w_tb)
Modified: pypy/branch/fast-forward/pypy/rlib/clibffi.py
==============================================================================
--- pypy/branch/fast-forward/pypy/rlib/clibffi.py (original)
+++ pypy/branch/fast-forward/pypy/rlib/clibffi.py Fri Oct 22 23:54:08 2010
@@ -148,7 +148,7 @@
# ffi_type_slong and ffi_type_ulong are omitted because
# their meaning changes too much from one libffi version to
# another. DON'T USE THEM! use cast_type_to_ffitype().
- 'float', 'pointer', 'void',
+ 'float', 'longdouble', 'pointer', 'void',
# by size
'sint8', 'uint8', 'sint16', 'uint16', 'sint32', 'uint32',
'sint64', 'uint64']
@@ -171,14 +171,16 @@
def _signed_type_for(TYPE):
sz = rffi.sizeof(TYPE)
- if sz == 2: return ffi_type_sint16
+ if sz == 1: return ffi_type_sint8
+ elif sz == 2: return ffi_type_sint16
elif sz == 4: return ffi_type_sint32
elif sz == 8: return ffi_type_sint64
else: raise ValueError("unsupported type size for %r" % (TYPE,))
def _unsigned_type_for(TYPE):
sz = rffi.sizeof(TYPE)
- if sz == 2: return ffi_type_uint16
+ if sz == 1: return ffi_type_uint8
+ elif sz == 2: return ffi_type_uint16
elif sz == 4: return ffi_type_uint32
elif sz == 8: return ffi_type_uint64
else: raise ValueError("unsupported type size for %r" % (TYPE,))
@@ -186,6 +188,7 @@
TYPE_MAP = {
rffi.DOUBLE : ffi_type_double,
rffi.FLOAT : ffi_type_float,
+ rffi.LONGDOUBLE : ffi_type_longdouble,
rffi.UCHAR : ffi_type_uchar,
rffi.CHAR : ffi_type_schar,
rffi.SHORT : ffi_type_sshort,
@@ -200,6 +203,7 @@
rffi.LONGLONG : _signed_type_for(rffi.LONGLONG),
lltype.Void : ffi_type_void,
lltype.UniChar : _unsigned_type_for(lltype.UniChar),
+ lltype.Bool : _unsigned_type_for(lltype.Bool),
}
def external(name, args, result, **kwds):
More information about the Pypy-commit
mailing list