Skip to content

Commit c9196a1

Browse files
committed
Update readme coverage numbers, add TODO note for assertions needed
1 parent dd4d1a9 commit c9196a1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ lua.doString(
7979

8080
| API | Support |
8181
|---|---|
82-
| Lua C API (`lua_*`) | 52% available (47/92) | <!-- 52.10% - Add 1.07 per -->
82+
| Lua C API (`lua_*`) | 52% available (48/92) | <!-- 52.10% - Add 1.07 per -->
8383
| Auxilary Library (`luaL_*`) | 6% available (3/48) | <!-- Always 2% * n, for n up to 48 -->
8484
| LuaJIT Extensions | *No plans to implement.* |
8585

src/root.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,10 @@ pub const Lua = opaque {
929929
pub fn concat(lua: *Lua, n: i32) void {
930930
assert(n >= 0);
931931

932+
// TODO: I think it would make sense to check that the `n` arguments are all either strings, numbers, or
933+
// types for which a `__concat` metamethod have been defined. The checks for strings and numbers are easy,
934+
// but the semantics of concat require handling metamethods which are a bit harder to check.
935+
// https://www.lua.org/manual/5.1/manual.html#2.8
932936
return c.lua_concat(asState(lua), n);
933937
}
934938

0 commit comments

Comments
 (0)