diff options
author | Christian Pointner <equinox@anylike.org> | 2009-12-25 15:46:56 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anylike.org> | 2009-12-25 15:46:56 +0000 |
commit | 7f637849f67c2b5f0fefb6a13c8aa72dd8f33df5 (patch) | |
tree | 6f7b476109a03d2784408ad89f2411953d3e5a1d /src/anylike.c | |
parent | moved from useless checklstring to checkstring (diff) |
handling return value of main_loop
Diffstat (limited to 'src/anylike.c')
-rw-r--r-- | src/anylike.c | 10 |
1 files changed, 7 insertions, 3 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[]) |