From f7a5e4f52c529a74ca0e4ec5a269c4d594990802 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 12 Jun 2022 21:47:52 +0200 Subject: Refactored io functions handling --- src/interpreter.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/interpreter.zig') diff --git a/src/interpreter.zig b/src/interpreter.zig index 1ab07c9..a947d6f 100644 --- a/src/interpreter.zig +++ b/src/interpreter.zig @@ -1,5 +1,6 @@ const std = @import("std"); const field = @import("field.zig"); +const io = @import("io.zig"); const pointer = @import("pointer.zig"); pub const Interpreter = struct { @@ -12,7 +13,7 @@ pub const Interpreter = struct { self.field.deinit(); self.allocator.destroy(self); } - pub fn init(allocator: std.mem.Allocator, reader: anytype, ioFunctions: ?pointer.IOFunctions, args: []const []const u8) !*Interpreter { + pub fn init(allocator: std.mem.Allocator, reader: anytype, ioFunctions: io.Functions, args: []const []const u8) !*Interpreter { var i = try allocator.create(Interpreter); errdefer allocator.destroy(i); i.allocator = allocator; -- cgit v1.2.3