summaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lua.c b/lua.c
index ad4e8c28..b2add022 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.188 2010/02/27 21:15:36 roberto Exp roberto $ 2** $Id: lua.c,v 1.189 2010/03/13 03:57:46 roberto Exp roberto $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -454,9 +454,10 @@ int main (int argc, char **argv) {
454 return EXIT_FAILURE; 454 return EXIT_FAILURE;
455 } 455 }
456 /* call 'pmain' in protected mode */ 456 /* call 'pmain' in protected mode */
457 lua_pushcfunction(L, &pmain);
457 lua_pushinteger(L, argc); /* 1st argument */ 458 lua_pushinteger(L, argc); /* 1st argument */
458 lua_pushlightuserdata(L, argv); /* 2nd argument */ 459 lua_pushlightuserdata(L, argv); /* 2nd argument */
459 status = luaL_cpcall(L, &pmain, 2, 1); 460 status = lua_pcall(L, 2, 1, 0);
460 result = lua_toboolean(L, -1); /* get result */ 461 result = lua_toboolean(L, -1); /* get result */
461 finalreport(L, status); 462 finalreport(L, status);
462 lua_close(L); 463 lua_close(L);