Skip to content

Commit

Permalink
updated lakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
grrrwaaa committed Apr 22, 2012
1 parent 93cca74 commit 643ef59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lakefile
Expand Up @@ -25,4 +25,6 @@ cpp.shared{
}, },
needs = { "uv", "lua" }, needs = { "uv", "lua" },
libflags = libflags, libflags = libflags,
} }

target('install', 'uv', 'sudo cp $(DEPENDS) /usr/local/lib/lua/5.1/$(DEPENDS)')
5 changes: 0 additions & 5 deletions lua_uv_stream.cpp
Expand Up @@ -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) { void lua_uv_stream_write_resume(uv_write_t * req, int status) {
dprintf("lua_uv_stream_write_resume\n"); dprintf("lua_uv_stream_write_resume\n");
lua_State * L = (lua_State *)req->data; lua_State * L = (lua_State *)req->data;

callback_resume_after(L); callback_resume_after(L);

lua_pushinteger(L, status); lua_pushinteger(L, status);
Lua(L).resume(1); Lua(L).resume(1);
} }
Expand All @@ -86,7 +84,6 @@ int lua_uv_stream_write(lua_State * L) {
uv_write_t * req = callback_resume_before<uv_write_t>(L, 1); uv_write_t * req = callback_resume_before<uv_write_t>(L, 1);
uv_buf_t * buf = lua_uv_buf_init(L, (char *)str, sz); uv_buf_t * buf = lua_uv_buf_init(L, (char *)str, sz);
uv_write(req, s, buf, 1, lua_uv_stream_write_resume); uv_write(req, s, buf, 1, lua_uv_stream_write_resume);
// keep these on the stack to prevent gc:
return lua_yield(L, 3); return lua_yield(L, 3);
} }
} }
Expand Down Expand Up @@ -143,9 +140,7 @@ int lua_uv_stream_accept(lua_State * L) {
void lua_uv_stream_shutdown_resume(uv_shutdown_t * req, int status) { void lua_uv_stream_shutdown_resume(uv_shutdown_t * req, int status) {
dprintf("lua_uv_stream_shutdown_resume\n"); dprintf("lua_uv_stream_shutdown_resume\n");
lua_State * L = (lua_State *)req->data; lua_State * L = (lua_State *)req->data;

callback_resume_after(L); callback_resume_after(L);

lua_pushinteger(L, status); lua_pushinteger(L, status);
Lua(L).resume(1); Lua(L).resume(1);
} }
Expand Down

0 comments on commit 643ef59

Please sign in to comment.