[pypy-commit] pypy fix-tpname: fix tp_name of cpyext typeobjects
bdkearns
noreply at buildbot.pypy.org
Fri May 2 21:39:10 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch: fix-tpname
Changeset: r71204:2af214ac9f7e
Date: 2014-05-02 15:31 -0400
http://bitbucket.org/pypy/pypy/changeset/2af214ac9f7e/
Log: fix tp_name of cpyext typeobjects
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
@@ -291,14 +291,9 @@
convert_getset_defs(space, dict_w, pto.c_tp_getset, self)
convert_member_defs(space, dict_w, pto.c_tp_members, self)
- full_name = rffi.charp2str(pto.c_tp_name)
- if '.' in full_name:
- module_name, extension_name = rsplit(full_name, ".", 1)
- dict_w["__module__"] = space.wrap(module_name)
- else:
- extension_name = full_name
+ name = rffi.charp2str(pto.c_tp_name)
- W_TypeObject.__init__(self, space, extension_name,
+ W_TypeObject.__init__(self, space, name,
bases_w or [space.w_object], dict_w)
if not space.is_true(space.issubtype(self, space.w_type)):
self.flag_cpytype = True
More information about the pypy-commit
mailing list