Author: Ronan Lamy <[email protected]>
Branch: refactor-slots
Changeset: r92554:9876c223e75f
Date: 2017-10-02 11:44 +0200
http://bitbucket.org/pypy/pypy/changeset/9876c223e75f/
Log: hg merge default
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
@@ -776,7 +776,7 @@
def __init__(self, method_name, slot_name, function, wrapper1, wrapper2,
doc):
self.method_name = method_name
self.slot_name = slot_name
- self.slot_names = ("c_" + slot_name).split(".")
+ self.slot_names = tuple(("c_" + slot_name).split("."))
self.slot_func = function
self.wrapper_func = wrapper1
self.wrapper_func_kwds = wrapper2
diff --git a/pypy/module/cpyext/typeobject.py b/pypy/module/cpyext/typeobject.py
--- a/pypy/module/cpyext/typeobject.py
+++ b/pypy/module/cpyext/typeobject.py
@@ -548,25 +548,18 @@
pto = obj.c_ob_type
base = pto
this_func_ptr = llslot(space, subtype_dealloc)
- w_obj = from_ref(space, rffi.cast(PyObject, base))
# This wrapper is created on a specific type, call it w_A.
# We wish to call the dealloc function from one of the base classes of w_A,
# the first of which is not this function itself.
# w_obj is an instance of w_A or one of its subclasses. So climb up the
# inheritance chain until base.c_tp_dealloc is exactly this_func, and then
# continue on up until they differ.
- #print 'subtype_dealloc, start from', rffi.charp2str(base.c_tp_name)
while base.c_tp_dealloc != this_func_ptr:
base = base.c_tp_base
assert base
- #print ' ne move to', rffi.charp2str(base.c_tp_name)
- w_obj = from_ref(space, rffi.cast(PyObject, base))
while base.c_tp_dealloc == this_func_ptr:
base = base.c_tp_base
assert base
- #print ' eq move to', rffi.charp2str(base.c_tp_name)
- w_obj = from_ref(space, rffi.cast(PyObject, base))
- #print ' end with', rffi.charp2str(base.c_tp_name)
dealloc = base.c_tp_dealloc
# XXX call tp_del if necessary
generic_cpy_call(space, dealloc, obj)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit