1
0
mirror of https://github.com/lua/lua synced 2026-06-08 15:34:49 +00:00
typo in comment + formatting + logical 'and' was written as a bitwise
operation (makes code more fragile)
This commit is contained in:
Roberto I
2025-12-23 14:44:06 -03:00
parent a5522f06d2
commit 578ae5745c
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -366,7 +366,7 @@ LUA_API int lua_compare (lua_State *L, int index1, int index2, int op) {
}
LUA_API unsigned (lua_numbertocstring) (lua_State *L, int idx, char *buff) {
LUA_API unsigned lua_numbertocstring (lua_State *L, int idx, char *buff) {
const TValue *o = index2value(L, idx);
if (ttisnumber(o)) {
unsigned len = luaO_tostringbuff(o, buff);
+1 -1
View File
@@ -1672,7 +1672,7 @@ static l_mem singlestep (lua_State *L, int fast) {
GCTM(L); /* call one finalizer */
stepresult = CWUFIN;
}
else { /* no more finalizers or emergency mode or no enough stack
else { /* no more finalizers or emergency mode or not enough stack
to run finalizers */
g->gcstate = GCSpause; /* finish collection */
stepresult = step2pause;
+1 -1
View File
@@ -968,7 +968,7 @@ static int str_gsub (lua_State *L) {
reprepstate(&ms); /* (re)prepare state for new match */
if ((e = match(&ms, src, p)) != NULL && e != lastmatch) { /* match? */
n++;
changed = add_value(&ms, &b, src, e, tr) | changed;
changed = add_value(&ms, &b, src, e, tr) || changed;
src = lastmatch = e;
}
else if (src < ms.src_end) /* otherwise, skip one character */