Skip to content

Commit 90dab7e

Browse files
noxabellusnatecraddock
authored andcommitted
added binding for luaopen_vector
1 parent f1fe9c8 commit 90dab7e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/lib.zig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4296,6 +4296,18 @@ pub const Lua = opaque {
42964296
if (lang == .lua52 or lang == .lua53 or lang == .lua54) lua.pop(1);
42974297
}
42984298

4299+
/// Open the vector standard library
4300+
///
4301+
/// Only available in Luau
4302+
///
4303+
/// * Pops: `0`
4304+
/// * Pushes: `0`
4305+
/// * Errors: `other`
4306+
pub fn openVector(lua: *Lua) void {
4307+
lua.requireF(c.LUA_VECLIBNAME, c.luaopen_vector, true);
4308+
if (lang == .lua52 or lang == .lua53 or lang == .lua54) lua.pop(1);
4309+
}
4310+
42994311
/// Returns if given typeinfo is a string type
43004312
fn isTypeString(typeinfo: std.builtin.Type.Pointer) bool {
43014313
const childinfo = @typeInfo(typeinfo.child);

0 commit comments

Comments
 (0)