From afdb19ac82bcb7ceabd010a484505105977352ba Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 14 Apr 2010 12:14:21 -0300 Subject: no more 'ccall' nor 'cpcall' functions. (With light C functions they are obsolete.) --- lua.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lua.c') diff --git a/lua.c b/lua.c index ad4e8c28..b2add022 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.188 2010/02/27 21:15:36 roberto Exp roberto $ +** $Id: lua.c,v 1.189 2010/03/13 03:57:46 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -454,9 +454,10 @@ int main (int argc, char **argv) { return EXIT_FAILURE; } /* call 'pmain' in protected mode */ + lua_pushcfunction(L, &pmain); lua_pushinteger(L, argc); /* 1st argument */ lua_pushlightuserdata(L, argv); /* 2nd argument */ - status = luaL_cpcall(L, &pmain, 2, 1); + status = lua_pcall(L, 2, 1, 0); result = lua_toboolean(L, -1); /* get result */ finalreport(L, status); lua_close(L); -- cgit v1.2.3-55-g6feb