Fix Lua examples for running under Lua 5.2

Includes cherry picking parts of
ce2760f77e
This commit is contained in:
William S Fulton 2014-02-22 00:43:18 +00:00
commit bf313809ae
6 changed files with 26 additions and 11 deletions

View file

@ -36,6 +36,10 @@ extern "C" int luaopen_example2(lua_State*L);
#define DEBUG2(X,Y) {printf(X,Y);fflush(stdout);}
#define DEBUG3(X,Y,Z) {printf(X,Y,Z);fflush(stdout);}
#if LUA_VERSION_NUM > 501
#define lua_open luaL_newstate
#endif
void testModule(lua_State *L)
{
swig_type_info *pTypeInfo=0,*pTypeInfo2=0;