diff options
author | Reuben Thomas <rrt@sc3d.org> | 2012-10-17 21:34:38 +0100 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2012-10-17 21:34:38 +0100 |
commit | 1ed329073eb786b2958f723b859c6f99cbe85d98 (patch) | |
tree | d522691d8eaab30a6c4096199134fec2cc8010be | |
parent | a23eb8906b15a517d1a5261ce1ccd829a0ce131c (diff) | |
download | lrexlib-1ed329073eb786b2958f723b859c6f99cbe85d98.tar.gz |
algo.h: fix to make it work on Lua 5.1; oops
-rw-r--r-- | src/algo.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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)", |