41 lua_pushnil(luastate);
42 lua_pushstring(luastate, msg);
49 if (!lua_isstring(luastate, idx))
51 const char *
str = lua_tostring(luastate, idx);
61 lua_pushstring(luastate, key);
62 lua_pushnumber(luastate, value);
63 lua_settable(luastate, -3);
72 lua_pushstring(luastate, key);
73 lua_pushstring(luastate, value ? value :
"(null)");
74 lua_settable(luastate, -3);
79 lua_pushstring(luastate, key);
81 lua_settable(luastate, -3);
95 lua_pushlstring (luastate, (
const char *)b->
data, b->
data_len);
107 static int LuaCallbackStreamingBuffer(
lua_State *luastate)
113 return LuaCallbackStreamingBufferPushToStack(luastate, b);
116 static int LuaCallbackLogPath(
lua_State *luastate)
136 lua_pushinteger (luastate, (lua_Integer)tid);
137 lua_pushstring (luastate,
tv->
name);
146 static int LuaCallbackThreadInfo(
lua_State *luastate)
152 return LuaCallbackThreadInfoPushToStackFromThreadVars(luastate,
tv);
158 lua_pushcfunction(luastate, LuaCallbackStreamingBuffer);
159 lua_setglobal(luastate,
"SCStreamingBuffer");
161 lua_pushcfunction(luastate, LuaCallbackLogPath);
162 lua_setglobal(luastate,
"SCLogPath");
164 lua_pushcfunction(luastate, LuaCallbackThreadInfo);
165 lua_setglobal(luastate,
"SCThreadInfo");
178 return (alproto == flow_alproto);