diff options
Diffstat (limited to '')
-rw-r--r-- | lauxlib.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: $ | 2 | ** $Id: lauxlib.c,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $ |
3 | ** Auxiliar functions for building Lua libraries | 3 | ** Auxiliar functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -57,6 +57,13 @@ double luaL_opt_number (int numArg, double def) | |||
57 | luaL_check_number(numArg); | 57 | luaL_check_number(numArg); |
58 | } | 58 | } |
59 | 59 | ||
60 | lua_Object luaL_nonnullarg (int numArg) | ||
61 | { | ||
62 | lua_Object o = lua_getparam(numArg); | ||
63 | luaL_arg_check(o != LUA_NOOBJECT, numArg, "value expected"); | ||
64 | return o; | ||
65 | } | ||
66 | |||
60 | void luaL_openlib (struct luaL_reg *l, int n) | 67 | void luaL_openlib (struct luaL_reg *l, int n) |
61 | { | 68 | { |
62 | int i; | 69 | int i; |
@@ -74,3 +81,5 @@ void luaL_verror (char *fmt, ...) | |||
74 | va_end(argp); | 81 | va_end(argp); |
75 | lua_error(buff); | 82 | lua_error(buff); |
76 | } | 83 | } |
84 | |||
85 | |||