[pypy-commit] pypy cpyext-ext: obscure hack
arigo
pypy.commits at gmail.com
Tue Feb 23 09:01:11 EST 2016
Author: Armin Rigo <arigo at 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
More information about the pypy-commit
mailing list