[pypy-svn] pypy default: COM methods are boolean True. Fix one test in test_pointers.py

amauryfa commits-noreply at bitbucket.org
Mon Mar 14 20:21:58 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: 
Changeset: r42636:6981cdab2ad4
Date: 2011-03-14 13:56 +0100
http://bitbucket.org/pypy/pypy/changeset/6981cdab2ad4/

Log:	COM methods are boolean True. Fix one test in test_pointers.py

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
@@ -509,7 +509,7 @@
         return callargs, outargs
 
     def __nonzero__(self):
-        return bool(self._buffer[0])
+        return self._com_index is not None or bool(self._buffer[0])
 
     def __del__(self):
         if self._needs_free:


More information about the Pypy-commit mailing list