[pypy-svn] r73558 - pypy/branch/cpython-extension/pypy/module/cpyext
jandem at codespeak.net
jandem at codespeak.net
Thu Apr 8 17:40:25 CEST 2010
Author: jandem
Date: Thu Apr 8 17:40:23 2010
New Revision: 73558
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py
Log:
Hack in typeobject.py to load bufferobject
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py Thu Apr 8 17:40:23 2010
@@ -208,8 +208,11 @@
convert_member_defs(space, dict_w, pto.c_tp_members, pto)
full_name = rffi.charp2str(pto.c_tp_name)
- module_name, extension_name = rsplit(full_name, ".", 1)
- dict_w["__module__"] = space.wrap(module_name)
+ if '.' in full_name:
+ module_name, extension_name = rsplit(full_name, ".", 1)
+ dict_w["__module__"] = space.wrap(module_name)
+ else:
+ extension_name = None
W_TypeObject.__init__(self, space, extension_name,
bases_w or [space.w_object], dict_w)
More information about the Pypy-commit
mailing list