From bbd1364de53186af975ef1694fdc8451208ce626 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 19 Oct 2026 15:14:01 +0200 Subject: zilch: make object calls type agnostic --- src/zilch/Object.zig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/zilch/Object.zig') diff --git a/src/zilch/Object.zig b/src/zilch/Object.zig index b37f40b..1d30b8a 100644 --- a/src/zilch/Object.zig +++ b/src/zilch/Object.zig @@ -7,27 +7,27 @@ const Function = Env.Function; const Self = @This(); -pub inline fn get(self: *Self, env: *Env, key: anytype) AnyFuture { +pub inline fn get(self: anytype, env: *Env, key: anytype) AnyFuture { return env.call(bindings.get, .{ self, key }); } -pub inline fn set(self: *Self, env: *Env, key: anytype, value: anytype) Future(void) { +pub inline fn set(self: anytype, env: *Env, key: anytype, value: anytype) Future(void) { return .fromAny(env.call(bindings.set, .{ self, key, value })); } -pub inline fn delete(self: *Self, env: *Env, key: anytype) Future(void) { +pub inline fn delete(self: anytype, env: *Env, key: anytype) Future(void) { return .fromAny(env.call(bindings.delete, .{ self, key })); } -pub inline fn call(self: *Self, env: *Env, method: []const u8, args: anytype) AnyFuture { +pub inline fn call(self: anytype, env: *Env, method: []const u8, args: anytype) AnyFuture { return env.call(bindings.call, .{ self, method } ++ args); } -pub inline fn free(self: *Self, env: *Env) Future(void) { +pub inline fn free(self: anytype, env: *Env) Future(void) { return .fromAny(env.call(bindings.free, .{self})); } -pub inline fn new(self: *Self, env: *Env) Future(*Self) { +pub inline fn new(self: anytype, env: *Env) Future(*Self) { return .fromAny(env.call(bindings.new, .{self})); } -- cgit v1.2.3-70-g09d2