aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-27 09:06:42 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-27 09:06:42 -0300
commit5038e3c58c2b6a3169492ae6aa239d0d6fbdc02b (patch)
tree327d9e4500e889f77fb129a52cf2653c20666aa6
parent5a7dee0c5d8dfa9a4d95c216f7c38d9f2b1cd441 (diff)
downloadlua-5038e3c58c2b6a3169492ae6aa239d0d6fbdc02b.tar.gz
lua-5038e3c58c2b6a3169492ae6aa239d0d6fbdc02b.tar.bz2
lua-5038e3c58c2b6a3169492ae6aa239d0d6fbdc02b.zip
corrected compatibility macro 'lua_cpcall' (untested)
-rw-r--r--luaconf.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/luaconf.h b/luaconf.h
index f0057da5..fde36b56 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -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