Skip to content

Commit

Permalink
added binding for luaopen_vector
Browse files Browse the repository at this point in the history
  • Loading branch information
noxabellus authored and natecraddock committed Dec 3, 2024
1 parent f1fe9c8 commit 90dab7e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4296,6 +4296,18 @@ pub const Lua = opaque {
if (lang == .lua52 or lang == .lua53 or lang == .lua54) lua.pop(1);
}

/// Open the vector standard library
///
/// Only available in Luau
///
/// * Pops: `0`
/// * Pushes: `0`
/// * Errors: `other`
pub fn openVector(lua: *Lua) void {
lua.requireF(c.LUA_VECLIBNAME, c.luaopen_vector, true);
if (lang == .lua52 or lang == .lua53 or lang == .lua54) lua.pop(1);
}

/// Returns if given typeinfo is a string type
fn isTypeString(typeinfo: std.builtin.Type.Pointer) bool {
const childinfo = @typeInfo(typeinfo.child);
Expand Down

0 comments on commit 90dab7e

Please sign in to comment.