From 4806404ecc87a285cd12ea80bc0b41fc0795b637 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Wed, 20 Aug 2008 16:13:57 +0000 Subject: [PATCH] Reverted r65902. See http://mail.python.org/pipermail/python-checkins/2008-August/073116.html --- Lib/test/test_os.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index a4417b016a..26c5482b30 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -267,13 +267,9 @@ class StatAttributeTests(unittest.TestCase): def get_file_system(path): root = os.path.splitdrive(os.path.abspath(path))[0] + '\\' import ctypes - from ctypes.wintypes import LPCWSTR, LPWSTR, DWORD - LPDWORD = ctypes.POINTER(DWORD) - f = ctypes.windll.kernel32.GetVolumeInformationW - f.argtypes = (LPCWSTR, LPWSTR, DWORD, - LPDWORD, LPDWORD, LPDWORD, LPWSTR, DWORD) - buf = ctypes.create_unicode_buffer("", 100) - if f(root, None, 0, None, None, None, buf, len(buf)): + kernel32 = ctypes.windll.kernel32 + buf = ctypes.create_string_buffer("", 100) + if kernel32.GetVolumeInformationA(root, None, 0, None, None, None, buf, len(buf)): return buf.value if get_file_system(test_support.TESTFN) == "NTFS": -- 2.40.0