summaryrefslogtreecommitdiffstats
path: root/Lib/ctypes/test
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2010-05-04 18:44:42 (GMT)
committerThomas Heller <theller@ctypes.org>2010-05-04 18:44:42 (GMT)
commit06a7e2069a94420ee1dcdb382817c034e925e4e0 (patch)
tree155d4aa0e0ea427ce28919a59e6c392fb7474d80 /Lib/ctypes/test
parentef9b4abfea9d840df2b8161a5cc7abda48ad3739 (diff)
downloadcpython-06a7e2069a94420ee1dcdb382817c034e925e4e0.zip
cpython-06a7e2069a94420ee1dcdb382817c034e925e4e0.tar.gz
cpython-06a7e2069a94420ee1dcdb382817c034e925e4e0.tar.bz2
On Windows, ctypes does no longer check the stack before and after
calling a foreign function. This allows to use the unmodified libffi library. Remove most files from _ctypes/libffi_msvc, only two include files stay (updated from _ctypes/libffi/...). Other files are used in the cross-platform _ctypes/libffi directory.
Diffstat (limited to 'Lib/ctypes/test')
-rw-r--r--Lib/ctypes/test/test_win32.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/Lib/ctypes/test/test_win32.py b/Lib/ctypes/test/test_win32.py
index 5dedd9f..3c0500d 100644
--- a/Lib/ctypes/test/test_win32.py
+++ b/Lib/ctypes/test/test_win32.py
@@ -6,32 +6,6 @@ import unittest, sys
import _ctypes_test
-if sys.platform == "win32" and sizeof(c_void_p) == sizeof(c_int):
- # Only windows 32-bit has different calling conventions.
-
- class WindowsTestCase(unittest.TestCase):
- def test_callconv_1(self):
- # Testing stdcall function
-
- IsWindow = windll.user32.IsWindow
- # ValueError: Procedure probably called with not enough arguments (4 bytes missing)
- self.assertRaises(ValueError, IsWindow)
-
- # This one should succeeed...
- self.assertEqual(0, IsWindow(0))
-
- # ValueError: Procedure probably called with too many arguments (8 bytes in excess)
- self.assertRaises(ValueError, IsWindow, 0, 0, 0)
-
- def test_callconv_2(self):
- # Calling stdcall function as cdecl
-
- IsWindow = cdll.user32.IsWindow
-
- # ValueError: Procedure called with not enough arguments (4 bytes missing)
- # or wrong calling convention
- self.assertRaises(ValueError, IsWindow, None)
-
if sys.platform == "win32":
class FunctionCallTestCase(unittest.TestCase):