@@ -710,11 +710,6 @@ pub const Lua = struct {
710
710
c .lua_pushlightuserdata (lua .state , ptr );
711
711
}
712
712
713
- /// There is no reason to have a pushLiteral function...
714
- // pub fn pushLiteral(lua: *Lua, str: []const u8) []const u8 {
715
- // c.lua_pushliteral(lua.state, str); // TODO
716
- // }
717
-
718
713
/// Pushes the bytes onto the stack. Returns a slice pointing to Lua's internal copy of the string
719
714
pub fn pushBytes (lua : * Lua , str : []const u8 ) []const u8 {
720
715
return c .lua_pushlstring (lua .state , str .ptr , str .len )[0.. str .len ];
@@ -733,8 +728,6 @@ pub const Lua = struct {
733
728
/// Pushes a zero-terminated string onto the stack
734
729
/// Lua makes a copy of the string so `str` may be freed immediately after return
735
730
/// Returns a pointer to the internal Lua string
736
- /// If `str` is null pushes nil and returns null
737
- /// TODO: is it useful to return null?
738
731
pub fn pushString (lua : * Lua , str : []const u8 ) []const u8 {
739
732
return c .lua_pushstring (lua .state , str .ptr ).? [0.. str .len ];
740
733
}
@@ -1571,7 +1564,7 @@ pub const Buffer = struct {
1571
1564
1572
1565
/// Adds `byte` to the buffer
1573
1566
pub fn addChar (buf : * Buffer , byte : u8 ) void {
1574
- // NOTE: could not be translated by translate-c
1567
+ // could not be translated by translate-c
1575
1568
var lua_buf = & buf .b ;
1576
1569
if (lua_buf .n >= lua_buf .size ) _ = buf .prepSize (1 );
1577
1570
lua_buf .b [lua_buf .n ] = byte ;
0 commit comments