diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-06-25 11:05:26 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-06-25 11:05:26 -0300 |
commit | 982aa7058f62781960169a38e20781f76be29ac6 (patch) | |
tree | 46178f807bdb0f85b2b263a4e8596d91513c221f /lauxlib.c | |
parent | 80cdf39d0ed1803825ecbbc81b64ab501b0f4b7c (diff) | |
download | lua-982aa7058f62781960169a38e20781f76be29ac6.tar.gz lua-982aa7058f62781960169a38e20781f76be29ac6.tar.bz2 lua-982aa7058f62781960169a38e20781f76be29ac6.zip |
'luaL_len' returns lua_Integer instead of 'int'
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 | } |