From 643ef59804147da2a9d502bd087a5cb4f5b1d6b6 Mon Sep 17 00:00:00 2001 From: graham wakefield Date: Sun, 22 Apr 2012 10:57:19 -0700 Subject: [PATCH] updated lakefile --- lakefile | 4 +++- lua_uv_stream.cpp | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lakefile b/lakefile index 0d317f5..0ae0ac0 100644 --- a/lakefile +++ b/lakefile @@ -25,4 +25,6 @@ cpp.shared{ }, needs = { "uv", "lua" }, libflags = libflags, -} \ No newline at end of file +} + +target('install', 'uv', 'sudo cp $(DEPENDS) /usr/local/lib/lua/5.1/$(DEPENDS)') diff --git a/lua_uv_stream.cpp b/lua_uv_stream.cpp index 0a3e68f..a3cc7db 100644 --- a/lua_uv_stream.cpp +++ b/lua_uv_stream.cpp @@ -66,9 +66,7 @@ int lua_uv_stream_read_stop(lua_State * L) { void lua_uv_stream_write_resume(uv_write_t * req, int status) { dprintf("lua_uv_stream_write_resume\n"); lua_State * L = (lua_State *)req->data; - callback_resume_after(L); - lua_pushinteger(L, status); Lua(L).resume(1); } @@ -86,7 +84,6 @@ int lua_uv_stream_write(lua_State * L) { uv_write_t * req = callback_resume_before(L, 1); uv_buf_t * buf = lua_uv_buf_init(L, (char *)str, sz); uv_write(req, s, buf, 1, lua_uv_stream_write_resume); - // keep these on the stack to prevent gc: return lua_yield(L, 3); } } @@ -143,9 +140,7 @@ int lua_uv_stream_accept(lua_State * L) { void lua_uv_stream_shutdown_resume(uv_shutdown_t * req, int status) { dprintf("lua_uv_stream_shutdown_resume\n"); lua_State * L = (lua_State *)req->data; - callback_resume_after(L); - lua_pushinteger(L, status); Lua(L).resume(1); }