spacepaste

  1.  
  2. diff -r 82d95ae3d2c8 pypy/module/cpyext/typeobject.py
  3. --- a/pypy/module/cpyext/typeobject.py Tue Jul 25 20:19:44 2017 +0200
  4. +++ b/pypy/module/cpyext/typeobject.py Wed Jul 26 19:17:05 2017 +0300
  5. @@ -757,11 +757,8 @@
  6. # only for the exact type, like 'space.w_tuple' or 'space.w_list'
  7. pto.c_tp_dealloc = typedescr.get_dealloc().get_llhelper(space)
  8. else:
  9. - # for all subtypes, use base's dealloc (requires sorting in attach_all)
  10. - pto.c_tp_dealloc = pto.c_tp_base.c_tp_dealloc
  11. - if not pto.c_tp_dealloc:
  12. - # strange, but happens (ABCMeta)
  13. - pto.c_tp_dealloc = llslot(space, subtype_dealloc)
  14. + # always assign to subtype_dealloc
  15. + pto.c_tp_dealloc = subtype_dealloc.api_func.get_llhelper(space)
  16. if builder.cpyext_type_init is not None:
  17. builder.cpyext_type_init.append((pto, w_type))
  18.