[pypy-svn] r73392 - pypy/branch/cpython-extension/pypy/module/cpyext
xoraxax at codespeak.net
xoraxax at codespeak.net
Mon Apr 5 02:02:45 CEST 2010
Author: xoraxax
Date: Mon Apr 5 02:02:44 2010
New Revision: 73392
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/api.py
Log:
Cast exceptions correctly and also include bool and none types.
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/api.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/api.py (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/api.py Mon Apr 5 02:02:44 2010
@@ -234,7 +234,7 @@
}
for exc_name in exceptions.Module.interpleveldefs.keys():
- GLOBALS['PyExc_' + exc_name] = ('PyObject*', 'space.gettypeobject(interp_exceptions.W_%s.typedef)'% (exc_name, ))
+ GLOBALS['PyExc_' + exc_name] = ('PyTypeObject*', 'space.gettypeobject(interp_exceptions.W_%s.typedef)'% (exc_name, ))
for cpyname, pypyexpr in {"Type": "space.w_type",
"BaseObject": "space.w_object",
@@ -242,6 +242,8 @@
"Tuple": "space.w_tuple",
"List": "space.w_list",
"Unicode": "space.w_unicode",
+ 'Bool': 'space.w_bool',
+ 'None': 'space.w_None',
}.items():
GLOBALS['Py%s_Type#' % (cpyname, )] = ('PyTypeObject*', pypyexpr)
More information about the Pypy-commit
mailing list