getn is deprecated

This commit is contained in:
Enno Rehling 2019-09-15 13:37:04 +02:00
parent e58f51e536
commit f06fd8945c
2 changed files with 5 additions and 2 deletions

View File

@ -23,7 +23,7 @@ function test_get_allies()
assert_equal(0, #allies)
f1:set_ally(f2, "give", true)
allies = f1.allies
assert_not_nil(1, table.getn(allies))
assert_not_nil(allies[f2.id])
assert_equal('table', type(allies[f2.id]))
assert_equal(1, #allies[f2.id])
assert_equal("give", allies[f2.id][1])

View File

@ -43,7 +43,10 @@ without prior permission by the authors of Eressea.
#include <lauxlib.h>
#include <tolua.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h> // for bool
#include <stdio.h> // for puts
struct allies;
int tolua_factionlist_next(lua_State * L)
{