diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-06-02 14:37:03 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-06-02 14:37:03 -0300 |
commit | f4718544de97bd2fc22117424ba0736c5295a8f2 (patch) | |
tree | e34f8ea84f4a7af058f6132687d745915e9f9166 /lua.h | |
parent | 50f9cd201e34f3464362a63c54207fff963507d0 (diff) | |
download | lua-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.h | 25 |
1 files changed, 5 insertions, 20 deletions
@@ -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 | ||
48 | typedef struct lua_State lua_State; | 47 | typedef 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 | ||