[pypy-svn] r73810 - pypy/branch/cpython-extension/pypy/module/cpyext
afa at codespeak.net
afa at codespeak.net
Fri Apr 16 15:14:53 CEST 2010
Author: afa
Date: Fri Apr 16 15:14:44 2010
New Revision: 73810
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/pyobject.py
Log:
Ensure that all keyword arguments to make_typedescr() are processed
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/pyobject.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/pyobject.py (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/pyobject.py Fri Apr 16 15:14:44 2010
@@ -28,10 +28,11 @@
dealloc : a cpython_api(external=False), similar to PyObject_dealloc
"""
- tp_basestruct = kw.get('basestruct', PyObject.TO)
- tp_attach = kw.get('attach')
- tp_realize = kw.get('realize')
- tp_dealloc = kw.get('dealloc')
+ tp_basestruct = kw.pop('basestruct', PyObject.TO)
+ tp_attach = kw.pop('attach', None)
+ tp_realize = kw.pop('realize', None)
+ tp_dealloc = kw.pop('dealloc', None)
+ assert not kw, "Extra arguments to make_typedescr"
null_dealloc = lltype.nullptr(lltype.FuncType([PyObject], lltype.Void))
More information about the Pypy-commit
mailing list