Skip to content

Commit 9e4f3db

Browse files
committed
cleanup: tidy and remove comments
1 parent 0b728f9 commit 9e4f3db

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/tests.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ test "standard library loading" {
131131
}
132132

133133
// open all standard libraries with individual functions
134-
// NOTE: these functions are only useful if you want to load the standard
134+
// these functions are only useful if you want to load the standard
135135
// packages into a non-standard table
136136
{
137137
var lua = try Lua.init(testing.allocator);
@@ -551,7 +551,7 @@ test "panic fn" {
551551

552552
// just test setting up the panic function
553553
// it uses longjmp so cannot return here to test
554-
// NOTE: perhaps a later version of zig can test an expected fail
554+
// TODO: perhaps a later version of zig can test an expected fail
555555
const panicFn = ziglua.wrap(struct {
556556
fn inner(l: *Lua) i32 {
557557
_ = l;

src/ziglua.zig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -710,11 +710,6 @@ pub const Lua = struct {
710710
c.lua_pushlightuserdata(lua.state, ptr);
711711
}
712712

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-
718713
/// Pushes the bytes onto the stack. Returns a slice pointing to Lua's internal copy of the string
719714
pub fn pushBytes(lua: *Lua, str: []const u8) []const u8 {
720715
return c.lua_pushlstring(lua.state, str.ptr, str.len)[0..str.len];
@@ -733,8 +728,6 @@ pub const Lua = struct {
733728
/// Pushes a zero-terminated string onto the stack
734729
/// Lua makes a copy of the string so `str` may be freed immediately after return
735730
/// 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?
738731
pub fn pushString(lua: *Lua, str: []const u8) []const u8 {
739732
return c.lua_pushstring(lua.state, str.ptr).?[0..str.len];
740733
}
@@ -1571,7 +1564,7 @@ pub const Buffer = struct {
15711564

15721565
/// Adds `byte` to the buffer
15731566
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
15751568
var lua_buf = &buf.b;
15761569
if (lua_buf.n >= lua_buf.size) _ = buf.prepSize(1);
15771570
lua_buf.b[lua_buf.n] = byte;

0 commit comments

Comments
 (0)