From 41964648eea1427d53934b886abb68cc8457b019 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 8 Sep 2015 12:41:05 -0300 Subject: long strings are created directly in final position when possible (instead of using an auxiliar buffer to first create the string and then allocate the final string and copy result there) --- lzio.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'lzio.c') diff --git a/lzio.c b/lzio.c index 63ade652..eb6151a0 100644 --- a/lzio.c +++ b/lzio.c @@ -1,5 +1,5 @@ /* -** $Id: lzio.c,v 1.35 2012/05/14 13:34:18 roberto Exp roberto $ +** $Id: lzio.c,v 1.36 2014/11/02 19:19:04 roberto Exp roberto $ ** Buffered streams ** See Copyright Notice in lua.h */ @@ -66,13 +66,3 @@ size_t luaZ_read (ZIO *z, void *b, size_t n) { return 0; } -/* ------------------------------------------------------------------------ */ -char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) { - if (n > buff->buffsize) { - if (n < LUA_MINBUFFER) n = LUA_MINBUFFER; - luaZ_resizebuffer(L, buff, n); - } - return buff->buffer; -} - - -- cgit v1.2.3-55-g6feb