diff options
| author | Lee Cannon <leecannon@leecannon.xyz> | 2021-10-29 02:08:41 +0100 |
|---|---|---|
| committer | Lee Cannon <leecannon@leecannon.xyz> | 2021-11-30 23:32:47 +0000 |
| commit | 1093b09a989edb8553e79b061bb15c5745f5d193 (patch) | |
| tree | 4e87b6b48410b901239a102f5fbdf859816511d1 /doc | |
| parent | 75548b50ff23a3de48d166170425001c073d27c1 (diff) | |
| download | zig-1093b09a989edb8553e79b061bb15c5745f5d193.tar.gz zig-1093b09a989edb8553e79b061bb15c5745f5d193.zip | |
allocgate: renamed getAllocator function to allocator
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/docgen.zig | 2 | ||||
| -rw-r--r-- | doc/langref.html.in | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/doc/docgen.zig b/doc/docgen.zig index 1f6ff74617..08502f0b79 100644 --- a/doc/docgen.zig +++ b/doc/docgen.zig @@ -21,7 +21,7 @@ pub fn main() !void { var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); defer arena.deinit(); - const allocator = arena.getAllocator(); + const allocator = arena.allocator(); var args_it = process.args(); diff --git a/doc/langref.html.in b/doc/langref.html.in index 631c948628..b2f211468e 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -10061,7 +10061,7 @@ const expect = std.testing.expect; test "using an allocator" { var buffer: [100]u8 = undefined; - const allocator = std.heap.FixedBufferAllocator.init(&buffer).getAllocator(); + const allocator = std.heap.FixedBufferAllocator.init(&buffer).allocator(); const result = try concat(allocator, "foo", "bar"); try expect(std.mem.eql(u8, "foobar", result)); } @@ -10114,7 +10114,7 @@ pub fn main() !void { var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); defer arena.deinit(); - const allocator = arena.getAllocator(); + const allocator = arena.allocator(); const ptr = try allocator.create(i32); std.debug.print("ptr={*}\n", .{ptr}); @@ -10820,7 +10820,7 @@ const std = @import("std"); pub fn main() !void { var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){}; - const gpa = general_purpose_allocator.getAllocator(); + const gpa = general_purpose_allocator.allocator(); const args = try std.process.argsAlloc(gpa); defer std.process.argsFree(gpa, args); @@ -10842,7 +10842,7 @@ const PreopenList = std.fs.wasi.PreopenList; pub fn main() !void { var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){}; - const gpa = general_purpose_allocator.getAllocator(); + const gpa = general_purpose_allocator.allocator(); var preopens = PreopenList.init(gpa); defer preopens.deinit(); |
