Fix compilation with lua 5.2 and 5.3

Mostly to have the lua53 "library" work with both lua 5.1 and lua 5.3.
Additionally fixes two other incompatibilities.

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2017-09-25 10:27:12 +02:00
parent 2cde3a8227
commit 3278ea5580
3 changed files with 19 additions and 4 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ static std::vector<Source*> readSourceList(lua_State *L, int n)
if (n < 0)
n += lua_gettop(L) + 1;
int items = (int) lua_objlen(L, n);
int items = (int) luax_objlen(L, n);
std::vector<Source*> sources(items);
for (int i = 0; i < items; i++)