Skip to content

Commit

Permalink
remove a forget block of code
Browse files Browse the repository at this point in the history
  • Loading branch information
axdank committed Dec 6, 2024
1 parent 82f038b commit 5ceb75e
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/lib.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4374,23 +4374,6 @@ pub const Lua = opaque {
const T = @TypeOf(value);
const type_info = @typeInfo(T);

if (type_info == .@"struct" or type_info == .@"union" or type_info == .@"enum") {
if (@hasDecl(T, "ziglua_pushAny")) {
const fnInfo = @typeInfo(@TypeOf(T.ziglua_pushAny)).@"fn";
switch (fnInfo.params.len) {
// fn(self, lua) -> void
2 => {
if (@typeInfo(fnInfo.return_type.?) == .error_union) {
return try value.ziglua_pushAny(lua);
} else {
return value.ziglua_pushAny(lua);
}
},
else => @compileError(@typeName(T) ++ ".ziglua_pushAny has invalid signature, required: fn(self: T, lua: *Lua) void"),
}
}
}

if (type_info == .@"struct" or type_info == .@"union" or type_info == .@"enum") {
if (@hasDecl(T, "toLua")) {
const toLuaArgs = .{ value, lua };
Expand Down

0 comments on commit 5ceb75e

Please sign in to comment.