diff options
| author | Roberto I <roberto@inf.puc-rio.br> | 2026-04-07 13:42:34 -0300 |
|---|---|---|
| committer | Roberto I <roberto@inf.puc-rio.br> | 2026-04-07 13:42:34 -0300 |
| commit | 29cf284089d543408d726440a3f1acaecdf73636 (patch) | |
| tree | e18363e7d53bb64d6f82943556ff0c3110778837 /ldblib.c | |
| parent | c037162a1a657088d722f550e287015525bb2259 (diff) | |
| download | lua-29cf284089d543408d726440a3f1acaecdf73636.tar.gz lua-29cf284089d543408d726440a3f1acaecdf73636.tar.bz2 lua-29cf284089d543408d726440a3f1acaecdf73636.zip | |
Avoid macros luaL_loadbuffer and luaL_loadfile
Use luaL_loadbufferx and luaL_loadfilex instead, being explicit about
whether to accept binary chunks.
Diffstat (limited to 'ldblib.c')
| -rw-r--r-- | ldblib.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -427,7 +427,7 @@ static int db_debug (lua_State *L) { | |||
| 427 | if (fgets(buffer, sizeof(buffer), stdin) == NULL || | 427 | if (fgets(buffer, sizeof(buffer), stdin) == NULL || |
| 428 | strcmp(buffer, "cont\n") == 0) | 428 | strcmp(buffer, "cont\n") == 0) |
| 429 | return 0; | 429 | return 0; |
| 430 | if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") || | 430 | if (luaL_loadbufferx(L, buffer, strlen(buffer), "=(debug command)", "t") || |
| 431 | lua_pcall(L, 0, 0, 0)) | 431 | lua_pcall(L, 0, 0, 0)) |
| 432 | lua_writestringerror("%s\n", luaL_tolstring(L, -1, NULL)); | 432 | lua_writestringerror("%s\n", luaL_tolstring(L, -1, NULL)); |
| 433 | lua_settop(L, 0); /* remove eventual returns */ | 433 | lua_settop(L, 0); /* remove eventual returns */ |
