[pypy-commit] pypy default: if the automatic conversion from str to c_wchar_p does not work, fallback to the slow path
antocuni
noreply at buildbot.pypy.org
Thu Jul 28 15:24:22 CEST 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
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
More information about the pypy-commit
mailing list