aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-05 09:14:08 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-05 09:14:08 -0300
commit001f2bdd0e2f8803889c1b5164b57a51e44aef5b (patch)
treed200cf4d708be3c61e64640c45b47050c9c6a375 /lauxlib.c
parentcd2ddaded97f7f2b2af02cecfd165cf70e6f83f4 (diff)
downloadlua-001f2bdd0e2f8803889c1b5164b57a51e44aef5b.tar.gz
lua-001f2bdd0e2f8803889c1b5164b57a51e44aef5b.tar.bz2
lua-001f2bdd0e2f8803889c1b5164b57a51e44aef5b.zip
new definition for types-tags
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lauxlib.c b/lauxlib.c
index d6398795..433c24df 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.37 2000/09/29 12:40:56 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.38 2000/10/02 20:10:55 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*/
@@ -40,7 +40,7 @@ void luaL_argerror (lua_State *L, int narg, const char *extramsg) {
40} 40}
41 41
42 42
43static void type_error (lua_State *L, int narg, lua_Type t) { 43static void type_error (lua_State *L, int narg, int t) {
44 char buff[100]; 44 char buff[100];
45 const char *rt = lua_typename(L, lua_type(L, narg)); 45 const char *rt = lua_typename(L, lua_type(L, narg));
46 if (*rt == 'N') rt = "no value"; 46 if (*rt == 'N') rt = "no value";
@@ -55,14 +55,14 @@ void luaL_checkstack (lua_State *L, int space, const char *mes) {
55} 55}
56 56
57 57
58void luaL_checktype(lua_State *L, int narg, lua_Type t) { 58void luaL_checktype(lua_State *L, int narg, int t) {
59 if (lua_type(L, narg) != t) 59 if (lua_type(L, narg) != t)
60 type_error(L, narg, t); 60 type_error(L, narg, t);
61} 61}
62 62
63 63
64void luaL_checkany (lua_State *L, int narg) { 64void luaL_checkany (lua_State *L, int narg) {
65 if (lua_type(L, narg) == LUA_NOVALUE) 65 if (lua_type(L, narg) == LUA_TNONE)
66 luaL_argerror(L, narg, "value expected"); 66 luaL_argerror(L, narg, "value expected");
67} 67}
68 68