summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2008-08-19 19:25:04 (GMT)
committerThomas Heller <theller@ctypes.org>2008-08-19 19:25:04 (GMT)
commit0ad5ae02af093ad2aa6e97b9eb503efb58e52fcc (patch)
tree4434819df9bb30598b3a26b9fda4a3ab880fd378 /Lib
parent4348a25665b2f09f76a605bab507b4edacc4dd24 (diff)
downloadcpython-0ad5ae02af093ad2aa6e97b9eb503efb58e52fcc.zip
cpython-0ad5ae02af093ad2aa6e97b9eb503efb58e52fcc.tar.gz
cpython-0ad5ae02af093ad2aa6e97b9eb503efb58e52fcc.tar.bz2
Fix a regression introduced by rev. 63792: ctypes function pointers
that are COM methods must have a boolean True value.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ctypes/test/test_pointers.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/ctypes/test/test_pointers.py b/Lib/ctypes/test/test_pointers.py
index fd42c80..076cd8b 100644
--- a/Lib/ctypes/test/test_pointers.py
+++ b/Lib/ctypes/test/test_pointers.py
@@ -1,4 +1,4 @@
-import unittest
+import unittest, sys
from ctypes import *
import _ctypes_test
@@ -183,5 +183,10 @@ class PointersTestCase(unittest.TestCase):
self.failUnlessEqual(bool(CFUNCTYPE(None)(0)), False)
self.failUnlessEqual(bool(CFUNCTYPE(None)(42)), True)
+ # COM methods are boolean True:
+ if sys.platform == "win32":
+ mth = WINFUNCTYPE(None)(42, "name", (), None)
+ self.failUnlessEqual(bool(mth), True)
+
if __name__ == '__main__':
unittest.main()