[pypy-svn] r79772 - pypy/branch/jitypes2/lib_pypy/_ctypes

antocuni at codespeak.net antocuni at codespeak.net
Fri Dec 3 11:47:54 CET 2010


Author: antocuni
Date: Fri Dec  3 11:47:45 2010
New Revision: 79772

Modified:
   pypy/branch/jitypes2/lib_pypy/_ctypes/function.py
Log:
make test_wchar_result passing.  Probably the details of type conversion will be refactored later


Modified: pypy/branch/jitypes2/lib_pypy/_ctypes/function.py
==============================================================================
--- pypy/branch/jitypes2/lib_pypy/_ctypes/function.py	(original)
+++ pypy/branch/jitypes2/lib_pypy/_ctypes/function.py	Fri Dec  3 11:47:45 2010
@@ -199,6 +199,9 @@
         restype = self._restype_
         funcptr = self._getfuncptr(argtypes, restype, thisarg)
         result = funcptr(*newargs)
+        if restype._ffishape == 'u':
+            # XXX: maybe it's a job of _ffi?
+            result = unichr(result)
         ## resbuffer = funcptr(*[arg._get_buffer_for_param()._buffer
         ##                       for arg in args])
         ## result = self._build_result(restype, resbuffer, argtypes, args)



More information about the Pypy-commit mailing list