diff options
Diffstat (limited to 'ldblib.c')
-rw-r--r-- | ldblib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldblib.c,v 1.142 2014/10/01 11:54:56 roberto Exp roberto $ | 2 | ** $Id: ldblib.c,v 1.143 2014/10/17 11:07:26 roberto Exp roberto $ |
3 | ** Interface from Lua to its debug API | 3 | ** Interface from Lua to its debug API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -374,13 +374,13 @@ static int db_gethook (lua_State *L) { | |||
374 | static int db_debug (lua_State *L) { | 374 | static int db_debug (lua_State *L) { |
375 | for (;;) { | 375 | for (;;) { |
376 | char buffer[250]; | 376 | char buffer[250]; |
377 | luai_writestringerror("%s", "lua_debug> "); | 377 | lua_writestringerror("%s", "lua_debug> "); |
378 | if (fgets(buffer, sizeof(buffer), stdin) == 0 || | 378 | if (fgets(buffer, sizeof(buffer), stdin) == 0 || |
379 | strcmp(buffer, "cont\n") == 0) | 379 | strcmp(buffer, "cont\n") == 0) |
380 | return 0; | 380 | return 0; |
381 | if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") || | 381 | if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") || |
382 | lua_pcall(L, 0, 0, 0)) | 382 | lua_pcall(L, 0, 0, 0)) |
383 | luai_writestringerror("%s\n", lua_tostring(L, -1)); | 383 | lua_writestringerror("%s\n", lua_tostring(L, -1)); |
384 | lua_settop(L, 0); /* remove eventual returns */ | 384 | lua_settop(L, 0); /* remove eventual returns */ |
385 | } | 385 | } |
386 | } | 386 | } |