[pypy-svn] r73073 - pypy/branch/cpython-extension/pypy/module/cpyext
xoraxax at codespeak.net
xoraxax at codespeak.net
Mon Mar 29 16:38:38 CEST 2010
Author: xoraxax
Date: Mon Mar 29 16:38:36 2010
New Revision: 73073
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/methodobject.py
Log:
Add casts and missing self.
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/methodobject.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/methodobject.py (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/methodobject.py Mon Mar 29 16:38:36 2010
@@ -34,7 +34,8 @@
self.space = space
self.ml = ml
self.name = rffi.charp2str(ml.c_ml_name)
- self.w_objclass = from_ref(space, pto)
+ pyo = rffi.cast(PyObject, pto)
+ self.w_objclass = from_ref(space, pyo)
def __repr__(self):
return "<method %r of %r objects>" % (self.name, self.w_objclass.getname(self.space, '?'))
@@ -52,14 +53,15 @@
self.wrapper_func_kwds = wrapper_func_kwds
self.doc = doc
self.func = func
- self.w_objclass = from_ref(space, pto)
+ pyo = rffi.cast(PyObject, pto)
+ self.w_objclass = from_ref(space, pyo)
def call(self, w_self, w_args, w_kw):
if self.wrapper_func is None:
assert self.wrapper_func_kwds is not None
return self.wrapper_func_kwds(self.space, w_self, w_args, self.func, w_kw)
if self.space.is_true(w_kw):
- raise operationerrfmt(space.w_TypeError,
+ raise operationerrfmt(self.space.w_TypeError,
"wrapper %s doesn't take any keyword arguments",
self.method_name)
return self.wrapper_func(self.space, w_self, w_args, self.func)
More information about the Pypy-commit
mailing list