diff options
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.31 2000/08/28 17:57:04 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.32 2000/08/29 14:33:31 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 | */ |
@@ -49,6 +49,12 @@ static void type_error (lua_State *L, int narg, const char *type_name) { | |||
49 | } | 49 | } |
50 | 50 | ||
51 | 51 | ||
52 | void luaL_checkstack (lua_State *L, int space, const char *mes) { | ||
53 | if (space > lua_stackspace(L)) | ||
54 | luaL_verror(L, "stack overflow (%.30s)", mes); | ||
55 | } | ||
56 | |||
57 | |||
52 | /* | 58 | /* |
53 | ** use the 3rd letter of type names for testing: | 59 | ** use the 3rd letter of type names for testing: |
54 | ** nuMber, niL, stRing, fuNction, usErdata, taBle, anY | 60 | ** nuMber, niL, stRing, fuNction, usErdata, taBle, anY |