Fix compile error on openwrt-x64
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
This commit is contained in:
1 parent
d9ef540473
commit
ecb3ea962f
1 file changed
+2
-4
+2
-4
@@ -550,12 +550,10 @@ static int uh_lua_send(lua_State *L)
|
|||||||
|
|
||||||
buf = luaL_checklstring(L, 1, &len);
|
buf = luaL_checklstring(L, 1, &len);
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
LUA_INTEGER p;
|
|
||||||
struct uh_client *cl;
|
struct uh_client *cl;
|
||||||
|
|
||||||
lua_getglobal(L, "__cl");
|
lua_getglobal(L, "__cl");
|
||||||
p = lua_tointeger(L, -1);
|
cl = lua_touserdata(L, -1);
|
||||||
cl = (struct uh_client *)(*(void **)&p);
|
|
||||||
cl->chunk_send(cl, buf, len);
|
cl->chunk_send(cl, buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -597,7 +595,7 @@ void uh_template(struct uh_client *cl)
|
|||||||
lua_setglobal(L, "uh_send");
|
lua_setglobal(L, "uh_send");
|
||||||
}
|
}
|
||||||
|
|
||||||
lua_pushinteger(L, (lua_Integer)(lua_Integer *)cl);
|
lua_pushlightuserdata(L, cl);
|
||||||
lua_setglobal(L, "__cl");
|
lua_setglobal(L, "__cl");
|
||||||
|
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
|
|||||||
Reference in new issue
Block a user