From 9cb6834fe07297ba79e7453978cf7e7d8d8c339a Mon Sep 17 00:00:00 2001 From: Philipp Janda Date: Mon, 18 Sep 2017 20:04:24 +0200 Subject: Add Travis-CI integration --- tests/testmod.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/testmod.c') diff --git a/tests/testmod.c b/tests/testmod.c index 1034d20..a0d2e2a 100644 --- a/tests/testmod.c +++ b/tests/testmod.c @@ -1,7 +1,5 @@ #include #include -#include -#include #include "compat-5.3.h" @@ -12,7 +10,7 @@ static int test_isinteger (lua_State *L) { static int test_rotate (lua_State *L) { - int r = luaL_checkint(L, 1); + int r = (int)luaL_checkinteger(L, 1); int n = lua_gettop(L)-1; luaL_argcheck(L, (r < 0 ? -r : r) <= n, 1, "not enough arguments"); lua_rotate(L, 2, r); @@ -336,6 +334,9 @@ static const luaL_Reg more_funcs[] = { }; +#ifdef __cplusplus +extern "C" { +#endif int luaopen_testmod (lua_State *L) { int i = 1; luaL_newlib(L, funcs); @@ -344,4 +345,7 @@ int luaopen_testmod (lua_State *L) { luaL_setfuncs(L, more_funcs, NUP); return 1; } +#ifdef __cplusplus +} +#endif -- cgit v1.2.3-55-g6feb