aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-25 14:45:36 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-25 14:45:36 -0200
commita53d9b66ca6247818acaf41e28cdf123082a272b (patch)
tree8e909200d4d925fc7394e6adf83cc5941456c588 /lua.h
parentc8559e3c8d12e052783e2952db1372c68cc16059 (diff)
downloadlua-a53d9b66ca6247818acaf41e28cdf123082a272b.tar.gz
lua-a53d9b66ca6247818acaf41e28cdf123082a272b.tar.bz2
lua-a53d9b66ca6247818acaf41e28cdf123082a272b.zip
first implementation for type names
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lua.h b/lua.h
index c8a105da..c6193483 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.82 2001/01/10 16:58:11 roberto Exp roberto $ 2** $Id: lua.h,v 1.83 2001/01/22 18:01:38 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil 4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
5** e-mail: lua@tecgraf.puc-rio.br 5** e-mail: lua@tecgraf.puc-rio.br
@@ -102,6 +102,7 @@ LUA_API int lua_stackspace (lua_State *L);
102 102
103LUA_API int lua_type (lua_State *L, int index); 103LUA_API int lua_type (lua_State *L, int index);
104LUA_API const char *lua_typename (lua_State *L, int t); 104LUA_API const char *lua_typename (lua_State *L, int t);
105LUA_API const char *lua_xtype (lua_State *L, int index);
105LUA_API int lua_isnumber (lua_State *L, int index); 106LUA_API int lua_isnumber (lua_State *L, int index);
106LUA_API int lua_isstring (lua_State *L, int index); 107LUA_API int lua_isstring (lua_State *L, int index);
107LUA_API int lua_iscfunction (lua_State *L, int index); 108LUA_API int lua_iscfunction (lua_State *L, int index);
@@ -173,7 +174,8 @@ LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold);
173/* 174/*
174** miscellaneous functions 175** miscellaneous functions
175*/ 176*/
176LUA_API int lua_newtag (lua_State *L); 177LUA_API int lua_newtype (lua_State *L, const char *name, int basictype);
178LUA_API int lua_type2tag (lua_State *L, const char *name);
177LUA_API int lua_copytagmethods (lua_State *L, int tagto, int tagfrom); 179LUA_API int lua_copytagmethods (lua_State *L, int tagto, int tagfrom);
178LUA_API void lua_settag (lua_State *L, int tag); 180LUA_API void lua_settag (lua_State *L, int tag);
179 181
@@ -212,6 +214,10 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size);
212 214
213#define lua_pushliteral(L, s) lua_pushlstring(L, "" s, (sizeof(s))-1) 215#define lua_pushliteral(L, s) lua_pushlstring(L, "" s, (sizeof(s))-1)
214 216
217
218
219#define lua_newtag(L) lua_newtype(L, NULL, LUA_TNONE)
220
215#endif 221#endif
216 222
217 223