Author: Antonio Cuni <[email protected]>
Branch: 
Changeset: r46040:10359ec64a51
Date: 2011-07-28 15:24 +0200
http://bitbucket.org/pypy/pypy/changeset/10359ec64a51/

Log:    if the automatic conversion from str to c_wchar_p does not work,
        fallback to the slow path

diff --git a/lib_pypy/_ctypes/function.py b/lib_pypy/_ctypes/function.py
--- a/lib_pypy/_ctypes/function.py
+++ b/lib_pypy/_ctypes/function.py
@@ -697,7 +697,7 @@
             try:
                 result = self._call_funcptr(funcptr, *args)
                 result = self._do_errcheck(result, args)
-            except (TypeError, ArgumentError): # XXX, should be FFITypeError
+            except (TypeError, ArgumentError, UnicodeDecodeError):
                 assert self._slowpath_allowed
                 return CFuncPtr.__call__(self, *args)
             return result
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to