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)
This commit is contained in:
Roberto Ierusalimschy
2015-09-08 12:41:05 -03:00
parent 502214f8a5
commit 41964648ee
11 changed files with 62 additions and 58 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lundump.h,v 1.43 2014/04/15 14:28:20 roberto Exp roberto $
** $Id: lundump.h,v 1.44 2014/06/19 18:27:20 roberto Exp roberto $
** load precompiled Lua chunks
** See Copyright Notice in lua.h
*/
@@ -23,8 +23,7 @@
#define LUAC_FORMAT 0 /* this is the official format */
/* load one chunk; from lundump.c */
LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff,
const char* name);
LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name);
/* dump one chunk; from ldump.c */
LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,