aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-06-02 14:37:03 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-06-02 14:37:03 -0300
commitf4718544de97bd2fc22117424ba0736c5295a8f2 (patch)
treee34f8ea84f4a7af058f6132687d745915e9f9166 /lua.h
parent50f9cd201e34f3464362a63c54207fff963507d0 (diff)
downloadlua-f4718544de97bd2fc22117424ba0736c5295a8f2.tar.gz
lua-f4718544de97bd2fc22117424ba0736c5295a8f2.tar.bz2
lua-f4718544de97bd2fc22117424ba0736c5295a8f2.zip
what is provided by lauxlib.c should be defined at lauxlib.h
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h25
1 files changed, 5 insertions, 20 deletions
diff --git a/lua.h b/lua.h
index 48b69b5f..94d4166e 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.189 2004/04/30 20:13:38 roberto Exp roberto $ 2** $Id: lua.h,v 1.190 2004/05/31 19:41:52 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil 4** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
5** http://www.lua.org mailto:info@lua.org 5** http://www.lua.org mailto:info@lua.org
@@ -37,12 +37,11 @@
37#define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) 37#define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i))
38 38
39 39
40/* error codes for `lua_load' and `lua_pcall' */ 40/* error codes for `lua_pcall' */
41#define LUA_ERRRUN 1 41#define LUA_ERRRUN 1
42#define LUA_ERRFILE 2 42#define LUA_ERRSYNTAX 2
43#define LUA_ERRSYNTAX 3 43#define LUA_ERRMEM 3
44#define LUA_ERRMEM 4 44#define LUA_ERRERR 4
45#define LUA_ERRERR 5
46 45
47 46
48typedef struct lua_State lua_State; 47typedef struct lua_State lua_State;
@@ -282,20 +281,6 @@ LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud);
282#define lua_getgccount(L) lua_gc(L, LUA_GCCOUNT, 0) 281#define lua_getgccount(L) lua_gc(L, LUA_GCCOUNT, 0)
283 282
284 283
285/* compatibility with ref system */
286
287/* pre-defined references */
288#define LUA_NOREF (-2)
289#define LUA_REFNIL (-1)
290
291#define lua_ref(L,lock) ((lock) ? luaL_ref(L, LUA_REGISTRYINDEX) : \
292 (lua_pushstring(L, "unlocked references are obsolete"), lua_error(L), 0))
293
294#define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref))
295
296#define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, ref)
297
298
299 284
300 285
301 286