Author: Armin Rigo <ar...@tunes.org> Branch: cpyext-ext Changeset: r82440:40299bc038b2 Date: 2016-02-23 15:00 +0100 http://bitbucket.org/pypy/pypy/changeset/40299bc038b2/
Log: obscure hack 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 @@ -376,9 +376,11 @@ convert_member_defs(space, dict_w, pto.c_tp_members, self) name = rffi.charp2str(pto.c_tp_name) + new_layout = (pto.c_tp_basicsize > rffi.sizeof(PyObject.TO) or + pto.c_tp_itemsize > 0) W_TypeObject.__init__(self, space, name, - bases_w or [space.w_object], dict_w, force_new_layout=True) + bases_w or [space.w_object], dict_w, force_new_layout=new_layout) if not space.is_true(space.issubtype(self, space.w_type)): self.flag_cpytype = True self.flag_heaptype = False _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit