diff options
| -rw-r--r-- | luaconf.h | 10 |
1 files changed, 6 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.136 2010/05/10 16:38:58 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.137 2010/05/12 14:17:36 roberto Exp roberto $ |
| 3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -229,10 +229,12 @@ | |||
| 229 | 229 | ||
| 230 | /* | 230 | /* |
| 231 | @@ LUA_COMPAT_CPCALL controls the presence of macro 'lua_cpcall'. | 231 | @@ LUA_COMPAT_CPCALL controls the presence of macro 'lua_cpcall'. |
| 232 | ** You can replace it with the preregistered function 'cpcall'. | 232 | ** You can call your C function directly (with light C functions) |
| 233 | */ | 233 | */ |
| 234 | #define lua_cpcall(L,f,u) \ | 234 | #define lua_cpcall(L,f,u) \ |
| 235 | (lua_pushlightuserdata(L,(u)), luaL_cpcall(L,(f),1,0)) | 235 | (lua_pushcfunction(L, (f)), \ |
| 236 | lua_pushlightuserdata(L,(u)), \ | ||
| 237 | lua_pcall(L,,1,0,0)) | ||
| 236 | 238 | ||
| 237 | 239 | ||
| 238 | /* | 240 | /* |
| @@ -477,7 +479,7 @@ union luai_Cast { double l_d; long l_l; }; | |||
| 477 | /* | 479 | /* |
| 478 | @@ luai_hashnum is a macro do hash a lua_Number value into an integer. | 480 | @@ luai_hashnum is a macro do hash a lua_Number value into an integer. |
| 479 | @* The hash must be deterministic and give reasonable values for | 481 | @* The hash must be deterministic and give reasonable values for |
| 480 | @* both small and large values (outside the range of integers). | 482 | @* both small and large values (outside the range of integers). |
| 481 | @* It is used only in ltable.c. | 483 | @* It is used only in ltable.c. |
| 482 | */ | 484 | */ |
| 483 | 485 | ||
