diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-08-18 17:36:26 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-08-18 17:36:26 -0300 |
| commit | 027e9e99ca99cb572398d18d1c61a1ea2e804b71 (patch) | |
| tree | cd83be0ee0018fd88eb8020b61ec8c829cab2d44 /lauxlib.h | |
| parent | 3b828d9e48caefdf4656f9920bf45c395f0f04d2 (diff) | |
| download | lua-027e9e99ca99cb572398d18d1c61a1ea2e804b71.tar.gz lua-027e9e99ca99cb572398d18d1c61a1ea2e804b71.tar.bz2 lua-027e9e99ca99cb572398d18d1c61a1ea2e804b71.zip | |
simpler implementation for userdata types
Diffstat (limited to 'lauxlib.h')
| -rw-r--r-- | lauxlib.h | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.h,v 1.80 2005/07/13 19:02:42 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.81 2005/08/15 14:12:32 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 | */ |
| @@ -60,7 +60,6 @@ LUALIB_API void (luaL_checktype) (lua_State *L, int narg, int t); | |||
| 60 | LUALIB_API void (luaL_checkany) (lua_State *L, int narg); | 60 | LUALIB_API void (luaL_checkany) (lua_State *L, int narg); |
| 61 | 61 | ||
| 62 | LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname); | 62 | LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname); |
| 63 | LUALIB_API void (luaL_getmetatable) (lua_State *L, const char *tname); | ||
| 64 | LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname); | 63 | LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname); |
| 65 | 64 | ||
| 66 | LUALIB_API void (luaL_where) (lua_State *L, int lvl); | 65 | LUALIB_API void (luaL_where) (lua_State *L, int lvl); |
| @@ -114,6 +113,8 @@ LUALIB_API const char *(luaL_setfield) (lua_State *L, int idx, | |||
| 114 | 113 | ||
| 115 | #define luaL_dostring(L, s) (luaL_loadstring(L, s) || lua_pcall(L, 0, 0, 0)) | 114 | #define luaL_dostring(L, s) (luaL_loadstring(L, s) || lua_pcall(L, 0, 0, 0)) |
| 116 | 115 | ||
| 116 | #define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) | ||
| 117 | |||
| 117 | 118 | ||
| 118 | /* | 119 | /* |
| 119 | ** {====================================================== | 120 | ** {====================================================== |
