Skip to content

Commit 01326e5

Browse files
authored
Merge pull request #23 from RustedBytes/ci
a fix for windows
2 parents e342ccb + f81b161 commit 01326e5

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

python/rsloop/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,17 +1157,17 @@ def __without_text_kwds(kwds: dict[str, object]) -> dict[str, object]:
11571157
def __windows_command_line_to_argv(cmd: str) -> list[str]:
11581158
import ctypes as __ctypes
11591159

1160-
argc = _ctypes.c_int()
1161-
command_line_to_argv = _ctypes.windll.shell32.CommandLineToArgvW
1162-
command_line_to_argv.argtypes = [_ctypes.c_wchar_p, _ctypes.POINTER(_ctypes.c_int)]
1163-
command_line_to_argv.restype = _ctypes.POINTER(_ctypes.c_wchar_p)
1164-
argv = command_line_to_argv(cmd, _ctypes.byref(argc))
1160+
argc = __ctypes.c_int()
1161+
command_line_to_argv = __ctypes.windll.shell32.CommandLineToArgvW
1162+
command_line_to_argv.argtypes = [__ctypes.c_wchar_p, __ctypes.POINTER(__ctypes.c_int)]
1163+
command_line_to_argv.restype = __ctypes.POINTER(__ctypes.c_wchar_p)
1164+
argv = command_line_to_argv(cmd, __ctypes.byref(argc))
11651165
if not argv:
11661166
raise OSError("CommandLineToArgvW failed")
11671167
try:
11681168
return [argv[index] for index in range(argc.value)]
11691169
finally:
1170-
_ctypes.windll.kernel32.LocalFree(argv)
1170+
__ctypes.windll.kernel32.LocalFree(argv)
11711171

11721172

11731173
async def __create_text_subprocess_exec(

0 commit comments

Comments
 (0)