Tvb* push_Tvb(lua_State* L, tvbuff_t* ws_tvb) { Tvb tvb = g_malloc(sizeof(struct _wslua_tvb)); tvb->ws_tvb = ws_tvb; tvb->expired = FALSE; g_ptr_array_add(outstanding_Tvb,tvb); return pushTvb(L,tvb); }
/* this is used to push Tvbs that were created brand new by wslua code */ int push_wsluaTvb(lua_State* L, Tvb t) { g_ptr_array_add(outstanding_Tvb,t); pushTvb(L,t); return 1; }