mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 03:44:46 +01:00
std.process.Args: make toSlice return mutable slice
Change return type from `[]const [:0]const u8` to `[][:0]const u8` to allow in-place reordering of arguments. Signed-off-by: Pablo Alessandro Santos Hugen <phugen@redhat.com>
This commit is contained in:
parent
813727623f
commit
b488ee7ec1
1 changed files with 1 additions and 1 deletions
|
|
@ -476,7 +476,7 @@ pub const ToSliceError = Iterator.Windows.InitError || Iterator.Wasi.InitError;
|
|||
/// See also:
|
||||
/// * `iterate`
|
||||
/// * `iterateAllocator`
|
||||
pub fn toSlice(a: Args, arena: Allocator) ToSliceError![]const [:0]const u8 {
|
||||
pub fn toSlice(a: Args, arena: Allocator) ToSliceError![][:0]const u8 {
|
||||
if (native_os == .windows) {
|
||||
var it = try a.iterateAllocator(arena);
|
||||
var contents: std.ArrayList(u8) = .empty;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue