Show More
@@ -190,16 +190,18 try: | |||||
190 | return py_arg_split(commandline, posix=posix, strict=strict) |
|
190 | return py_arg_split(commandline, posix=posix, strict=strict) | |
191 | argvn = c_int() |
|
191 | argvn = c_int() | |
192 | result_pointer = CommandLineToArgvW(commandline.lstrip(), ctypes.byref(argvn)) |
|
192 | result_pointer = CommandLineToArgvW(commandline.lstrip(), ctypes.byref(argvn)) | |
193 | result_array_type = LPCWSTR * argvn.value |
|
193 | try: | |
194 | result = [ |
|
194 | result_array_type = LPCWSTR * argvn.value | |
195 |
|
|
195 | result = [ | |
196 | for arg in result_array_type.from_address( |
|
196 | arg | |
197 | ctypes.addressof(result_pointer.contents) |
|
197 | for arg in result_array_type.from_address( | |
198 | ) |
|
198 | ctypes.addressof(result_pointer.contents) | |
199 |
|
|
199 | ) | |
200 | ] |
|
200 | if arg is not None | |
201 | # for side effects |
|
201 | ] | |
202 | _ = LocalFree(result_pointer) |
|
202 | finally: | |
|
203 | # for side effects | |||
|
204 | _ = LocalFree(result_pointer) | |||
203 | return result |
|
205 | return result | |
204 | except AttributeError: |
|
206 | except AttributeError: | |
205 | arg_split = py_arg_split |
|
207 | arg_split = py_arg_split |
General Comments 0
You need to be logged in to leave comments.
Login now