aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 8d90598..452a579 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -80,7 +80,9 @@ int buffer_meth_send(lua_State *L, p_buffer buf) {
80 const char *data = luaL_checklstring(L, 2, &size); 80 const char *data = luaL_checklstring(L, 2, &size);
81 long start = (long) luaL_optnumber(L, 3, 1); 81 long start = (long) luaL_optnumber(L, 3, 1);
82 long end = (long) luaL_optnumber(L, 4, -1); 82 long end = (long) luaL_optnumber(L, 4, -1);
83#ifdef LUASOCKET_DEBUG
83 p_timeout tm = timeout_markstart(buf->tm); 84 p_timeout tm = timeout_markstart(buf->tm);
85#endif
84 if (start < 0) start = (long) (size+start+1); 86 if (start < 0) start = (long) (size+start+1);
85 if (end < 0) end = (long) (size+end+1); 87 if (end < 0) end = (long) (size+end+1);
86 if (start < 1) start = (long) 1; 88 if (start < 1) start = (long) 1;
@@ -111,7 +113,9 @@ int buffer_meth_receive(lua_State *L, p_buffer buf) {
111 luaL_Buffer b; 113 luaL_Buffer b;
112 size_t size; 114 size_t size;
113 const char *part = luaL_optlstring(L, 3, "", &size); 115 const char *part = luaL_optlstring(L, 3, "", &size);
116#ifdef LUASOCKET_DEBUG
114 p_timeout tm = timeout_markstart(buf->tm); 117 p_timeout tm = timeout_markstart(buf->tm);
118#endif
115 /* initialize buffer with optional extra prefix 119 /* initialize buffer with optional extra prefix
116 * (useful for concatenating previous partial results) */ 120 * (useful for concatenating previous partial results) */
117 luaL_buffinit(L, &b); 121 luaL_buffinit(L, &b);