diff options
author | Matti Picus <matti.picus@gmail.com> | 2017-08-23 21:28:09 +0300 |
---|---|---|
committer | Matti Picus <matti.picus@gmail.com> | 2017-08-23 21:28:09 +0300 |
commit | 00a3cc7d14ba3cbc23ecf3a6f5d6ed0e52519ef9 (patch) | |
tree | 941abd95e4b6d718622c23e6cd771b38629a80f9 /pypy/module/cpyext/userslot.py | |
parent | (fijal, arigo) (diff) | |
download | pypy-00a3cc7d14ba3cbc23ecf3a6f5d6ed0e52519ef9.tar.gz pypy-00a3cc7d14ba3cbc23ecf3a6f5d6ed0e52519ef9.tar.bz2 pypy-00a3cc7d14ba3cbc23ecf3a6f5d6ed0e52519ef9.zip |
test, fix for missing userslot tp_iter, tp_iternext, this time via PyObject_Call
Diffstat (limited to 'pypy/module/cpyext/userslot.py')
-rw-r--r-- | pypy/module/cpyext/userslot.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pypy/module/cpyext/userslot.py b/pypy/module/cpyext/userslot.py index 45f37161a6..96946a3c33 100644 --- a/pypy/module/cpyext/userslot.py +++ b/pypy/module/cpyext/userslot.py @@ -122,3 +122,11 @@ def slot_tp_descr_set(space, w_self, w_obj, w_value): else: space.delete(w_self, w_obj) return 0 + +@slot_function([PyObject], PyObject) +def slot_tp_iter(space, w_self): + return space.iter(w_self) + +@slot_function([PyObject], PyObject) +def slot_tp_iternext(space, w_self): + return space.next(w_self) |