Commit a0fcafd
authored
host_env: Use Rustix for copy_file_range (RustPython#8099)
Rustix bypasses `libc` to make direct syscalls on Linux. Rustix is also
semantically cleaner than `libc` itself. For `copy_file_range`, the
offsets can't be negative but `libc`'s `off_t` type is an `i64` because
it's used elsewhere, including for functions that CAN take a negative
offset. Rustix is cleaner because the offsets are `u64`.1 parent 370fc76 commit a0fcafd
3 files changed
Lines changed: 28 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
283 | 267 | | |
284 | 268 | | |
285 | 269 | | |
| |||
369 | 353 | | |
370 | 354 | | |
371 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
372 | 363 | | |
373 | 364 | | |
374 | 365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1709 | 1709 | | |
1710 | 1710 | | |
1711 | 1711 | | |
1712 | | - | |
| 1712 | + | |
1713 | 1713 | | |
1714 | 1714 | | |
1715 | 1715 | | |
1716 | 1716 | | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
1717 | 1727 | | |
1718 | 1728 | | |
1719 | 1729 | | |
1720 | | - | |
| 1730 | + | |
1721 | 1731 | | |
1722 | | - | |
| 1732 | + | |
1723 | 1733 | | |
1724 | 1734 | | |
1725 | | - | |
| 1735 | + | |
1726 | 1736 | | |
1727 | 1737 | | |
1728 | 1738 | | |
| |||
0 commit comments