Author: Antonio Cuni <[email protected]>
Branch: cpyext-fast-typecheck
Changeset: r94100:5baee26aad6e
Date: 2018-03-22 22:53 +0100
http://bitbucket.org/pypy/pypy/changeset/5baee26aad6e/

Log:    port wrap_getattro

diff --git a/pypy/module/cpyext/slotdefs.py b/pypy/module/cpyext/slotdefs.py
--- a/pypy/module/cpyext/slotdefs.py
+++ b/pypy/module/cpyext/slotdefs.py
@@ -187,11 +187,13 @@
         finally:
             rffi.free_charp(name_ptr)
 
-def wrap_getattro(space, w_self, w_args, func):
-    func_target = rffi.cast(getattrofunc, func)
-    check_num_args(space, w_args, 1)
-    args_w = space.fixedview(w_args)
-    return generic_cpy_call(space, func_target, w_self, args_w[0])
+class wrap_getattro(W_PyCWrapperObject):
+    def call(self, space, w_self, __args__):
+        self.check_args(__args__, 1)
+        func = self.get_func_to_call()
+        func_target = rffi.cast(getattrofunc, func)
+        w_name = __args__.arguments_w[0]
+        return generic_cpy_call(space, func_target, w_self, w_name)
 
 class wrap_setattr(W_PyCWrapperObject):
     def call(self, space, w_self, __args__):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to