aboutsummaryrefslogtreecommitdiff
path: root/ldblib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-12-02 15:13:13 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-12-02 15:13:13 -0300
commitd9d2904f09a8039522dfd6f118d4e37bffd5bdf6 (patch)
tree76ff74360f1d2451bb4fd78be1d8093ccd61fc7e /ldblib.c
parent65d2294454ab68d164154c7ce05caa50bd97d143 (diff)
downloadlua-d9d2904f09a8039522dfd6f118d4e37bffd5bdf6.tar.gz
lua-d9d2904f09a8039522dfd6f118d4e37bffd5bdf6.tar.bz2
lua-d9d2904f09a8039522dfd6f118d4e37bffd5bdf6.zip
Details
Names in the parser and other details that do not change actual code.
Diffstat (limited to 'ldblib.c')
-rw-r--r--ldblib.c4
1 files changed, 2 insertions, 2 deletions
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) {
377 } 377 }
378 if (!luaL_getsubtable(L, LUA_REGISTRYINDEX, HOOKKEY)) { 378 if (!luaL_getsubtable(L, LUA_REGISTRYINDEX, HOOKKEY)) {
379 /* table just created; initialize it */ 379 /* table just created; initialize it */
380 lua_pushstring(L, "k"); 380 lua_pushliteral(L, "k");
381 lua_setfield(L, -2, "__mode"); /** hooktable.__mode = "k" */ 381 lua_setfield(L, -2, "__mode"); /** hooktable.__mode = "k" */
382 lua_pushvalue(L, -1); 382 lua_pushvalue(L, -1);
383 lua_setmetatable(L, -2); /* metatable(hooktable) = hooktable */ 383 lua_setmetatable(L, -2); /* metatable(hooktable) = hooktable */
@@ -420,7 +420,7 @@ static int db_debug (lua_State *L) {
420 for (;;) { 420 for (;;) {
421 char buffer[250]; 421 char buffer[250];
422 lua_writestringerror("%s", "lua_debug> "); 422 lua_writestringerror("%s", "lua_debug> ");
423 if (fgets(buffer, sizeof(buffer), stdin) == 0 || 423 if (fgets(buffer, sizeof(buffer), stdin) == NULL ||
424 strcmp(buffer, "cont\n") == 0) 424 strcmp(buffer, "cont\n") == 0)
425 return 0; 425 return 0;
426 if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") || 426 if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") ||