Commit 33825e8
committed
SwiftDriver: avoid using
The C-String to Swift-String conversion would corrupt the path on
Windows, where the path separator would get dropped. This would result
in the inability to use the driver due to the failure to load the
standard library as the SDK would not be consulted.
Directly convert the raw buffer to a `Data` for the foreign
representation. Note that this also makes the code clearer as we
explicitly see the copying as opposed to the use of the deprecated
`String(bytesNoCopy:length:encoding:freeWhenDone:)` function.
Thanks to @artemcm for the help with this!toSwiftString for target info1 parent f4b0ef0 commit 33825e8
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
346 | 350 | | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
| |||
0 commit comments