fix more private member access

This commit is contained in:
Vexu
2020-05-08 14:52:09 +03:00
parent b6dc7fc9ff
commit 10abffcd98
3 changed files with 5 additions and 5 deletions

View File

@@ -386,7 +386,7 @@ pub const AddressList = struct {
addrs: []Address,
canon_name: ?[]u8,
fn deinit(self: *AddressList) void {
pub fn deinit(self: *AddressList) void {
// Here we copy the arena allocator into stack memory, because
// otherwise it would destroy itself while it was still working.
var arena = self.arena;

View File

@@ -644,7 +644,7 @@ const MsfStream = struct {
return stream;
}
fn readNullTermString(self: *MsfStream, allocator: *mem.Allocator) ![]u8 {
pub fn readNullTermString(self: *MsfStream, allocator: *mem.Allocator) ![]u8 {
var list = ArrayList(u8).init(allocator);
while (true) {
const byte = try self.inStream().readByte();
@@ -684,13 +684,13 @@ const MsfStream = struct {
return buffer.len;
}
fn seekBy(self: *MsfStream, len: i64) !void {
pub fn seekBy(self: *MsfStream, len: i64) !void {
self.pos = @intCast(u64, @intCast(i64, self.pos) + len);
if (self.pos >= self.blocks.len * self.block_size)
return error.EOF;
}
fn seekTo(self: *MsfStream, len: u64) !void {
pub fn seekTo(self: *MsfStream, len: u64) !void {
self.pos = len;
if (self.pos >= self.blocks.len * self.block_size)
return error.EOF;

View File

@@ -236,7 +236,7 @@ pub const Inst = struct {
@"comptime_int",
@"comptime_float",
fn toType(self: BuiltinType) Type {
pub fn toType(self: BuiltinType) Type {
return switch (self) {
.@"isize" => Type.initTag(.@"isize"),
.@"usize" => Type.initTag(.@"usize"),