aboutsummaryrefslogtreecommitdiff
path: root/src-self-hosted/package.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-04-01 13:44:19 -0400
committerAndrew Kelley <andrew@ziglang.org>2020-04-01 13:44:19 -0400
commitc2e8788259efd33995e151ace355cb5896cc8a85 (patch)
tree7962a47dd9df3976a7aa8c8c5ad754d27dd55ba4 /src-self-hosted/package.zig
parente8a1e2a1d8f2903d5951339f7d3e0dbdfc85704c (diff)
parent2e806682f451efd26bef0486ddd980ab60de0fa1 (diff)
downloadzig-c2e8788259efd33995e151ace355cb5896cc8a85.tar.gz
zig-c2e8788259efd33995e151ace355cb5896cc8a85.zip
Merge branch 'daurnimator-less-buffer'
closes #4665
Diffstat (limited to 'src-self-hosted/package.zig')
-rw-r--r--src-self-hosted/package.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src-self-hosted/package.zig b/src-self-hosted/package.zig
index c8d46c7719..3111555878 100644
--- a/src-self-hosted/package.zig
+++ b/src-self-hosted/package.zig
@@ -1,11 +1,11 @@
const std = @import("std");
const mem = std.mem;
const assert = std.debug.assert;
-const Buffer = std.Buffer;
+const ArrayListSentineled = std.ArrayListSentineled;
pub const Package = struct {
- root_src_dir: Buffer,
- root_src_path: Buffer,
+ root_src_dir: ArrayListSentineled(u8, 0),
+ root_src_path: ArrayListSentineled(u8, 0),
/// relative to root_src_dir
table: Table,
@@ -17,8 +17,8 @@ pub const Package = struct {
pub fn create(allocator: *mem.Allocator, root_src_dir: []const u8, root_src_path: []const u8) !*Package {
const ptr = try allocator.create(Package);
ptr.* = Package{
- .root_src_dir = try Buffer.init(allocator, root_src_dir),
- .root_src_path = try Buffer.init(allocator, root_src_path),
+ .root_src_dir = try ArrayListSentineled(u8, 0).init(allocator, root_src_dir),
+ .root_src_path = try ArrayListSentineled(u8, 0).init(allocator, root_src_path),
.table = Table.init(allocator),
};
return ptr;