diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-29 14:44:31 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-29 14:44:31 -0300 |
| commit | 82a1f5d35462f26269b22ad72ef771e870c1417d (patch) | |
| tree | f8726848f72e81f74a59c608b2e4c61dff9d5a96 | |
| parent | a8d3aa14fdcbc8c8ee6512bbcb4ad51a488a1e57 (diff) | |
| download | lua-82a1f5d35462f26269b22ad72ef771e870c1417d.tar.gz lua-82a1f5d35462f26269b22ad72ef771e870c1417d.tar.bz2 lua-82a1f5d35462f26269b22ad72ef771e870c1417d.zip | |
comments
| -rw-r--r-- | lauxlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.204 2010/03/19 21:04:17 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.205 2010/03/22 17:28:31 roberto Exp roberto $ |
| 3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -789,9 +789,9 @@ LUALIB_API int luaL_cpcall (lua_State *L, lua_CFunction f, int nargs, | |||
| 789 | int nresults) { | 789 | int nresults) { |
| 790 | nargs++; /* to include function itself */ | 790 | nargs++; /* to include function itself */ |
| 791 | lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_CCALL); | 791 | lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_CCALL); |
| 792 | lua_insert(L, -nargs); | 792 | lua_insert(L, -nargs); /* 'ccall' is real function to be called */ |
| 793 | lua_pushlightuserdata(L, &f); | 793 | lua_pushlightuserdata(L, &f); |
| 794 | lua_insert(L, -nargs); | 794 | lua_insert(L, -nargs); /* 'f' address is its first argument */ |
| 795 | return lua_pcall(L, nargs, nresults, 0); | 795 | return lua_pcall(L, nargs, nresults, 0); |
| 796 | } | 796 | } |
| 797 | 797 | ||
