Author: Wim Lavrijsen <[email protected]>
Branch: reflex-support
Changeset: r52328:546264233337
Date: 2012-02-08 15:12 -0800
http://bitbucket.org/pypy/pypy/changeset/546264233337/
Log: minor cleanup
diff --git a/pypy/module/cppyy/converter.py b/pypy/module/cppyy/converter.py
--- a/pypy/module/cppyy/converter.py
+++ b/pypy/module/cppyy/converter.py
@@ -34,12 +34,10 @@
def __init__(self, space, extra):
pass
- @jit.dont_look_inside
def _get_raw_address(self, space, w_obj, offset):
rawobject = get_rawobject(space, w_obj)
assert lltype.typeOf(rawobject) == capi.C_OBJECT
if rawobject:
-
fieldptr = _direct_ptradd(rawobject, offset)
else:
fieldptr = rffi.cast(capi.C_OBJECT, offset)
diff --git a/pypy/module/cppyy/interp_cppyy.py
b/pypy/module/cppyy/interp_cppyy.py
--- a/pypy/module/cppyy/interp_cppyy.py
+++ b/pypy/module/cppyy/interp_cppyy.py
@@ -112,10 +112,9 @@
@jit.unroll_safe
def call(self, cppthis, w_type, args_w):
assert lltype.typeOf(cppthis) == capi.C_OBJECT
- if self.executor is None:
- raise OperationError(self.space.w_TypeError,
- self.space.wrap("return type not handled"))
- if len(self.arg_defs) < len(args_w) or len(args_w) <
self.args_required:
+ args_expected = len(self.arg_defs)
+ args_given = len(args_w)
+ if args_expected < args_given or args_given < self.args_required:
raise OperationError(self.space.w_TypeError,
self.space.wrap("wrong number of arguments"))
if self.methgetter and cppthis: # only for methods
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit