mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
use luaL_buffinitsize
This commit is contained in:
@@ -184,7 +184,7 @@ pop_lstring(lua_State *L, struct socket_buffer *sb, int sz, int skip) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
luaL_Buffer b;
|
luaL_Buffer b;
|
||||||
luaL_buffinit(L, &b);
|
luaL_buffinitsize(L, &b, sz);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int bytes = current->sz - sb->offset;
|
int bytes = current->sz - sb->offset;
|
||||||
if (bytes >= sz) {
|
if (bytes >= sz) {
|
||||||
|
|||||||
Reference in New Issue
Block a user