[pypy-commit] pypy default: we don't need to pass through a callback to execute _cast_addr: all tests pass by just calling it

antocuni noreply at buildbot.pypy.org
Wed Jul 27 13:24:21 CEST 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r46008:f35e37079ff2
Date: 2011-07-27 12:04 +0200
http://bitbucket.org/pypy/pypy/changeset/f35e37079ff2/

Log:	we don't need to pass through a callback to execute _cast_addr: all
	tests pass by just calling it

diff --git a/lib-python/modified-2.7/ctypes/__init__.py b/lib-python/modified-2.7/ctypes/__init__.py
--- a/lib-python/modified-2.7/ctypes/__init__.py
+++ b/lib-python/modified-2.7/ctypes/__init__.py
@@ -489,9 +489,8 @@
         _flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI
     return CFunctionType
 
-_cast = PYFUNCTYPE(py_object, c_void_p, py_object, py_object)(_cast_addr)
 def cast(obj, typ):
-    return _cast(obj, obj, typ)
+    return _cast_addr(obj, obj, typ)
 
 _string_at = PYFUNCTYPE(py_object, c_void_p, c_int)(_string_at_addr)
 def string_at(ptr, size=-1):


More information about the pypy-commit mailing list