Skip to content

fix: remove Lua.equal with compile error for lua 5.2, 5.3, 5.4 #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/lib.zig
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,10 @@ pub const Lua = opaque {
///
/// See https://www.lua.org/manual/5.1/manual.html#lua_equal
pub fn equal(lua: *Lua, index1: i32, index2: i32) bool {
switch (lang) {
.lua52, .lua53, .lua54 => @compileError("lua_equal is deprecated, use Lua.compare with .eq instead"),
else => {},
}
return c.lua_equal(@ptrCast(lua), index1, index2) == 1;
}

Expand Down
Loading