--- mod_lua_wrap.cpp.old 2015-06-16 12:27:19.024000000 -0500 +++ mod_lua_wrap.cpp 2015-06-16 12:34:51.540000000 -0500 @@ -3065,7 +3065,7 @@ } result = (char *)(arg1)->read(arg2); - lua_pushstring(L,(const char *)result); SWIG_arg++; + lua_pushlstring(L,(const char*)result, (*arg2)); SWIG_arg++; lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++; return SWIG_arg; @@ -6855,7 +6855,7 @@ SWIG_check_num_args("LUA::Session::Session",0,0) result = (LUA::Session *)new LUA::Session(); - SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L); return SWIG_arg; if(0) SWIG_fail; @@ -6882,7 +6882,7 @@ } result = (LUA::Session *)new LUA::Session(arg1,arg2); - SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L); return SWIG_arg; if(0) SWIG_fail; @@ -6902,7 +6902,7 @@ if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("LUA::Session::Session",1,"char *"); arg1 = (char *)lua_tostring(L, 1); result = (LUA::Session *)new LUA::Session(arg1); - SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L); return SWIG_arg; if(0) SWIG_fail; @@ -6926,7 +6926,7 @@ } result = (LUA::Session *)new LUA::Session(arg1); - SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L); return SWIG_arg; if(0) SWIG_fail; @@ -9217,6 +9217,7 @@ static int _wrap_Dbh_test_reactive__SWIG_0(lua_State* L) { arg2 = (char *)lua_tostring(L, 2); arg3 = (char *)lua_tostring(L, 3); arg4 = (char *)lua_tostring(L, 4); + switch_assert(arg1); result = (bool)(arg1)->test_reactive(arg2,arg3,arg4); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; @@ -9404,6 +9405,7 @@ static int _wrap_Dbh_query(lua_State* L) { (&arg3)->idx = 3; } } + switch_assert(arg1); result = (bool)(arg1)->query(arg2,arg3); lua_pushboolean(L,(int)(result!=0)); SWIG_arg++; return SWIG_arg; @@ -9427,7 +9429,7 @@ static int _wrap_Dbh_affected_rows(lua_State* L) { if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Dbh,0))){ SWIG_fail_ptr("Dbh_affected_rows",1,SWIGTYPE_p_LUA__Dbh); } - + switch_assert(arg1); result = (int)(arg1)->affected_rows(); lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; @@ -9451,7 +9453,7 @@ static int _wrap_Dbh_last_error(lua_State* L) { if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Dbh,0))){ SWIG_fail_ptr("Dbh_last_error",1,SWIGTYPE_p_LUA__Dbh); } - + switch_assert(arg1); result = (char *)(arg1)->last_error(); lua_pushstring(L,(const char *)result); SWIG_arg++; return SWIG_arg; @@ -9474,7 +9476,7 @@ static int _wrap_Dbh_clear_error(lua_State* L) { if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Dbh,0))){ SWIG_fail_ptr("Dbh_clear_error",1,SWIGTYPE_p_LUA__Dbh); } - + switch_assert(arg1); (arg1)->clear_error(); return SWIG_arg; @@ -9502,6 +9504,7 @@ static int _wrap_Dbh_load_extension(lua_State* L) { } arg2 = (char *)lua_tostring(L, 2); + switch_assert(arg1); result = (int)(arg1)->load_extension((char const *)arg2); lua_pushnumber(L, (lua_Number) result); SWIG_arg++; return SWIG_arg; @@ -9601,6 +9604,7 @@ static int _wrap_JSON_decode(lua_State* L) { } arg2 = (char *)lua_tostring(L, 2); + switch_assert(arg1); result = (cJSON *)(arg1)->decode((char const *)arg2); { SWIG_arg += LUA::JSON::cJSON2LuaTable(L, result); @@ -9634,6 +9638,7 @@ static int _wrap_JSON_encode(lua_State* L) { (&arg2)->L = L; (&arg2)->idx = 2; } + switch_assert(arg1); result = (char *)(arg1)->encode(arg2); lua_pushstring(L,(const char *)result); SWIG_arg++; return SWIG_arg; @@ -9661,6 +9666,7 @@ static int _wrap_JSON_execute__SWIG_0(lua_State* L) { } arg2 = (char *)lua_tostring(L, 2); + switch_assert(arg1); result = (cJSON *)(arg1)->execute((char const *)arg2); { SWIG_arg += LUA::JSON::cJSON2LuaTable(L, result); @@ -9694,6 +9700,7 @@ static int _wrap_JSON_execute__SWIG_1(lua_State* L) { (&arg2)->L = L; (&arg2)->idx = 2; } + switch_assert(arg1); result = (cJSON *)(arg1)->execute(arg2); { SWIG_arg += LUA::JSON::cJSON2LuaTable(L, result); @@ -9778,6 +9785,7 @@ static int _wrap_JSON_execute2__SWIG_0(lua_State* L) { } arg2 = (char *)lua_tostring(L, 2); + switch_assert(arg1); result = (char *)(arg1)->execute2((char const *)arg2); lua_pushstring(L,(const char *)result); SWIG_arg++; return SWIG_arg; @@ -9808,6 +9816,7 @@ static int _wrap_JSON_execute2__SWIG_1(lua_State* L) { (&arg2)->L = L; (&arg2)->idx = 2; } + switch_assert(arg1); result = (char *)(arg1)->execute2(arg2); lua_pushstring(L,(const char *)result); SWIG_arg++; return SWIG_arg; @@ -9888,6 +9897,7 @@ static int _wrap_JSON_encode_empty_table_as_object(lua_State* L) { } arg2 = (lua_toboolean(L, 2)!=0); + switch_assert(arg1); (arg1)->encode_empty_table_as_object(arg2); return SWIG_arg; @@ -9914,6 +9924,7 @@ static int _wrap_JSON_return_unformatted_json(lua_State* L) { } arg2 = (lua_toboolean(L, 2)!=0); + switch_assert(arg1); (arg1)->return_unformatted_json(arg2); return SWIG_arg;