summaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-03-19 19:28:37 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-03-19 19:28:37 -0300
commita275d9a25b161af426696d7b73d46f91150309c9 (patch)
tree763a5694213fe30b231bc81777cec71828935696 /lua.h
parent7e0be1fbde80d72886e11bcbf114a8dbf6d5e1d9 (diff)
downloadlua-github-a275d9a25b161af426696d7b73d46f91150309c9.tar.gz
functions "lua_is..." consider coercions.
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/lua.h b/lua.h
index a268a176..1bfcfaf1 100644
--- a/lua.h
+++ b/lua.h
@@ -2,7 +2,7 @@
** LUA - Linguagem para Usuarios de Aplicacao
** Grupo de Tecnologia em Computacao Grafica
** TeCGraf - PUC-Rio
-** $Id: lua.h,v 3.22 1996/02/12 18:32:09 roberto Exp roberto $
+** $Id: lua.h,v 3.23 1996/02/14 13:40:26 roberto Exp $
*/
@@ -52,6 +52,14 @@ void lua_endblock (void);
lua_Object lua_getparam (int number);
#define lua_getresult(_) lua_getparam(_)
+#define lua_isnil(_) (lua_type(_)==LUA_T_NIL)
+#define lua_istable(_) (lua_type(_)==LUA_T_ARRAY)
+#define lua_isuserdata(_) (lua_type(_)>=LUA_T_USERDATA)
+#define lua_iscfunction(_) (lua_type(_)==LUA_T_CFUNCTION)
+int lua_isnumber (lua_Object object);
+int lua_isstring (lua_Object object);
+int lua_isfunction (lua_Object object);
+
float lua_getnumber (lua_Object object);
char *lua_getstring (lua_Object object);
lua_CFunction lua_getcfunction (lua_Object object);
@@ -88,14 +96,6 @@ lua_Object lua_createtable (void);
#define lua_pushuserdata(u) lua_pushusertag(u, LUA_T_USERDATA)
-#define lua_isnil(_) (lua_type(_)==LUA_T_NIL)
-#define lua_isnumber(_) (lua_type(_)==LUA_T_NUMBER)
-#define lua_isstring(_) (lua_type(_)==LUA_T_STRING)
-#define lua_istable(_) (lua_type(_)==LUA_T_ARRAY)
-#define lua_isfunction(_) (lua_type(_)==LUA_T_FUNCTION)
-#define lua_iscfunction(_) (lua_type(_)==LUA_T_CFUNCTION)
-#define lua_isuserdata(_) (lua_type(_)>=LUA_T_USERDATA)
-
/* for compatibility with old versions. Avoid using these macros */