moonbridge
diff moonbridge_io.c @ 91:6b26783f9323
write_nb returns total number of bytes buffered in case of block; Updated reference
author | jbe |
---|---|
date | Tue Apr 07 03:50:28 2015 +0200 (2015-04-07) |
parents | 54e6104c70a6 |
children | 111b2469b753 |
line diff
1.1 --- a/moonbridge_io.c Tue Apr 07 02:52:41 2015 +0200 1.2 +++ b/moonbridge_io.c Tue Apr 07 03:50:28 2015 +0200 1.3 @@ -268,13 +268,12 @@ 1.4 handle->writebufcnt = 0; 1.5 if (nonblocking) lua_pushinteger(L, 0); 1.6 } else { 1.7 - if (nonblocking) lua_pushinteger(L, handle->writeleft - handle->writebufcnt); 1.8 + if (nonblocking) lua_pushinteger(L, handle->writeleft); 1.9 } 1.10 if (!nonblocking) lua_pushvalue(L, 1); 1.11 return 1; 1.12 moonbr_io_write_impl_block: 1.13 - if (flush) lua_pushinteger(L, handle->writeleft); 1.14 - else lua_pushinteger(L, handle->writeleft - handle->writebufcnt); 1.15 + lua_pushinteger(L, handle->writeleft); 1.16 return 1; 1.17 } 1.18