mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merged revisions 65868,65870 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r65868 | thomas.heller | 2008-08-19 21:25:04 +0200 (Di, 19 Aug 2008) | 3 lines Fix a regression introduced by rev. 63792: ctypes function pointers that are COM methods must have a boolean True value. ........ r65870 | thomas.heller | 2008-08-19 21:40:23 +0200 (Di, 19 Aug 2008) | 1 line COM method code is windows specific ........
This commit is contained in:
parent
58ea9fedc8
commit
f5049fc8c6
3 changed files with 37 additions and 6 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue