From d9d2904f09a8039522dfd6f118d4e37bffd5bdf6 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 2 Dec 2020 15:13:13 -0300 Subject: Details Names in the parser and other details that do not change actual code. --- ldblib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ldblib.c') diff --git a/ldblib.c b/ldblib.c index 5a326ade..15593bfb 100644 --- a/ldblib.c +++ b/ldblib.c @@ -377,7 +377,7 @@ static int db_sethook (lua_State *L) { } if (!luaL_getsubtable(L, LUA_REGISTRYINDEX, HOOKKEY)) { /* table just created; initialize it */ - lua_pushstring(L, "k"); + lua_pushliteral(L, "k"); lua_setfield(L, -2, "__mode"); /** hooktable.__mode = "k" */ lua_pushvalue(L, -1); lua_setmetatable(L, -2); /* metatable(hooktable) = hooktable */ @@ -420,7 +420,7 @@ static int db_debug (lua_State *L) { for (;;) { char buffer[250]; lua_writestringerror("%s", "lua_debug> "); - if (fgets(buffer, sizeof(buffer), stdin) == 0 || + if (fgets(buffer, sizeof(buffer), stdin) == NULL || strcmp(buffer, "cont\n") == 0) return 0; if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") || -- cgit v1.2.3-55-g6feb