diff options
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.252 2013/06/14 18:34:49 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.253 2013/06/14 20:46:40 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 | */ |
@@ -731,13 +731,13 @@ LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event) { | |||
731 | } | 731 | } |
732 | 732 | ||
733 | 733 | ||
734 | LUALIB_API int luaL_len (lua_State *L, int idx) { | 734 | LUALIB_API lua_Integer luaL_len (lua_State *L, int idx) { |
735 | int l; | 735 | lua_Integer l; |
736 | int isnum; | 736 | int isnum; |
737 | lua_len(L, idx); | 737 | lua_len(L, idx); |
738 | l = (int)lua_tointegerx(L, -1, &isnum); | 738 | l = lua_tointegerx(L, -1, &isnum); |
739 | if (!isnum) | 739 | if (!isnum) |
740 | luaL_error(L, "object length is not a number"); | 740 | luaL_error(L, "object length is not an integer"); |
741 | lua_pop(L, 1); /* remove object */ | 741 | lua_pop(L, 1); /* remove object */ |
742 | return l; | 742 | return l; |
743 | } | 743 | } |