@@ -717,7 +717,6 @@ pub const Lua = struct {
717717 }
718718
719719 /// Calls a function (or callable object) in protected mode
720- /// NOTE: it might be good to make the args named struct params?
721720 pub fn protectedCall (lua : * Lua , num_args : i32 , num_results : i32 , msg_handler : i32 ) ! void {
722721 // The translate-c version of lua_pcall does not type-check so we must rewrite it
723722 // (macros don't always translate well with translate-c)
@@ -1321,7 +1320,7 @@ pub const Lua = struct {
13211320
13221321 /// Grows the stack size to top + `size` elements, raising an error if the stack cannot grow to that size
13231322 /// `msg` is an additional text to go into the error message
1324- pub fn checkStackAux (lua : * Lua , size : i32 , msg : ? [* :0 ]const u8 ) void {
1323+ pub fn checkStackErr (lua : * Lua , size : i32 , msg : ? [* :0 ]const u8 ) void {
13251324 c .luaL_checkstack (lua .state , size , msg );
13261325 }
13271326
@@ -1369,7 +1368,7 @@ pub const Lua = struct {
13691368 }
13701369
13711370 /// Raises an error
1372- pub fn raiseErrorAux (lua : * Lua , fmt : [:0 ]const u8 , args : anytype ) noreturn {
1371+ pub fn raiseErrorStr (lua : * Lua , fmt : [:0 ]const u8 , args : anytype ) noreturn {
13731372 _ = @call (.auto , c .luaL_error , .{ lua .state , fmt .ptr } ++ args );
13741373 unreachable ;
13751374 }
@@ -1396,8 +1395,8 @@ pub const Lua = struct {
13961395 /// Pushes onto the stack the metatable associated with the name `type_name` in the registry
13971396 /// or nil if there is no metatable associated with that name. Returns the type of the pushed value
13981397 /// TODO: return error when type is nil?
1399- pub fn getMetatableAux (lua : * Lua , type_name : [:0 ]const u8 ) void {
1400- c .luaL_getmetatable (lua .state , type_name .ptr );
1398+ pub fn getMetatableRegistry (lua : * Lua , table_name : [:0 ]const u8 ) void {
1399+ c .luaL_getmetatable (lua .state , table_name .ptr );
14011400 }
14021401
14031402 /// Ensures that the value t[`field`], where t is the value at `index`, is a table, and pushes that table onto the stack.
@@ -1413,7 +1412,7 @@ pub const Lua = struct {
14131412
14141413 /// Returns the "length" of the value at the given index as a number
14151414 /// it is equivalent to the '#' operator in Lua
1416- pub fn lenAux (lua : * Lua , index : i32 ) i64 {
1415+ pub fn lenRaiseErr (lua : * Lua , index : i32 ) i64 {
14171416 return c .luaL_len (lua .state , index );
14181417 }
14191418
@@ -1495,7 +1494,7 @@ pub const Lua = struct {
14951494 }
14961495
14971496 /// Creates a new Lua state with an allocator using the default libc allocator
1498- pub fn newStateAux () ! Lua {
1497+ pub fn newStateLibc () ! Lua {
14991498 const state = c .luaL_newstate () orelse return error .Memory ;
15001499 return Lua { .state = state };
15011500 }
@@ -1553,7 +1552,7 @@ pub const Lua = struct {
15531552 /// Registers all functions in the array `fns` into the table on the top of the stack
15541553 /// All functions are created with `num_upvalues` upvalues
15551554 pub fn setFuncs (lua : * Lua , funcs : []const FnReg , num_upvalues : i32 ) void {
1556- lua .checkStackAux (num_upvalues , "too many upvalues" );
1555+ lua .checkStackErr (num_upvalues , "too many upvalues" );
15571556 for (funcs ) | f | {
15581557 if (f .func ) | func | {
15591558 var i : i32 = 0 ;
@@ -1568,7 +1567,7 @@ pub const Lua = struct {
15681567
15691568 /// Sets the metatable of the object on the top of the stack as the metatable associated
15701569 /// with `table_name` in the registry
1571- pub fn setMetatableAux (lua : * Lua , table_name : [:0 ]const u8 ) void {
1570+ pub fn setMetatableRegistry (lua : * Lua , table_name : [:0 ]const u8 ) void {
15721571 c .luaL_setmetatable (lua .state , table_name .ptr );
15731572 }
15741573
@@ -1580,7 +1579,7 @@ pub const Lua = struct {
15801579 }
15811580
15821581 /// Converts any Lua value at the given index into a string in a reasonable format
1583- pub fn toBytesAux (lua : * Lua , index : i32 ) [:0 ]const u8 {
1582+ pub fn toBytesFmt (lua : * Lua , index : i32 ) [:0 ]const u8 {
15841583 var length : usize = undefined ;
15851584 const ptr = c .luaL_tolstring (lua .state , index , & length );
15861585 return ptr [0.. length :0 ];
0 commit comments