Commits

Brian Kearns committed 2af214a

fix tp_name of cpyext typeobjects

Comments (0)

Files changed (1)

pypy/module/cpyext/typeobject.py

         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