diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/anylike.c | 10 | ||||
-rw-r--r-- | src/main_loop.lua | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/anylike.c b/src/anylike.c index c6e39d7..d42dc4e 100644 --- a/src/anylike.c +++ b/src/anylike.c @@ -130,11 +130,15 @@ int main_loop(options_t* opt) return -1; } - - + int n = lua_gettop(L); + log_printf(DEBUG, "%s returned %d values", LUA_MAIN_LOOP, n); + int i; + for (i = 1; i <= n; i++) + log_printf(DEBUG, "return value [%d] = '%s'", i, luaL_checkstring(L, i)); + ret = lua_tointeger(L, 1); lua_close(L); - return 0; + return ret; } int main(int argc, char* argv[]) diff --git a/src/main_loop.lua b/src/main_loop.lua index 295caa5..b3a0c28 100644 --- a/src/main_loop.lua +++ b/src/main_loop.lua @@ -31,4 +31,4 @@ log.print("ERROR", "this is an error"); log.print("NOTICE", crypt.test()); -return "hello", "world"; +return 0, "hello", "world"; |