Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
algo.h: fix to make it work on Lua 5.1; oops
Browse files Browse the repository at this point in the history
  • Loading branch information
rrthomas committed Oct 17, 2012
1 parent a23eb89 commit 1ed3290
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/algo.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ static void check_subject (lua_State *L, int pos, TArgExec *argE)
lua_typename (L, type));
argE->text = lua_touserdata (L, -1);
lua_pop (L, 1);
#if LUA_VERSION_NUM == 501
lua_objlen (L, pos);
#else
lua_len (L, pos);
#endif
type = lua_type (L, -1);
if (type != LUA_TNUMBER)
luaL_error (L, "subject's length is %s (expected number)",
Expand Down

0 comments on commit 1ed3290

Please sign in to comment.