aboutsummaryrefslogtreecommitdiff
path: root/lzio.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-09-08 12:41:05 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-09-08 12:41:05 -0300
commit41964648eea1427d53934b886abb68cc8457b019 (patch)
treeb0388dfebe6614d5d49306193faf78f8b9e1a6a1 /lzio.c
parent502214f8a551cd01d94677f98a40aa51531ef71d (diff)
downloadlua-41964648eea1427d53934b886abb68cc8457b019.tar.gz
lua-41964648eea1427d53934b886abb68cc8457b019.tar.bz2
lua-41964648eea1427d53934b886abb68cc8457b019.zip
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)
Diffstat (limited to 'lzio.c')
-rw-r--r--lzio.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/lzio.c b/lzio.c
index 63ade652..eb6151a0 100644
--- a/lzio.c
+++ b/lzio.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lzio.c,v 1.35 2012/05/14 13:34:18 roberto Exp roberto $ 2** $Id: lzio.c,v 1.36 2014/11/02 19:19:04 roberto Exp roberto $
3** Buffered streams 3** Buffered streams
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -66,13 +66,3 @@ size_t luaZ_read (ZIO *z, void *b, size_t n) {
66 return 0; 66 return 0;
67} 67}
68 68
69/* ------------------------------------------------------------------------ */
70char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) {
71 if (n > buff->buffsize) {
72 if (n < LUA_MINBUFFER) n = LUA_MINBUFFER;
73 luaZ_resizebuffer(L, buff, n);
74 }
75 return buff->buffer;
76}
77
78