Commit 10abffcd98

Vexu <git@vexu.eu>
2020-05-08 13:52:09
fix more private member access
1 parent b6dc7fc
Changed files (3)
lib
src-self-hosted
lib/std/net.zig
@@ -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;
lib/std/pdb.zig
@@ -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;
src-self-hosted/ir/text.zig
@@ -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"),