diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-16 15:55:49 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-08-16 15:55:49 -0300 |
commit | 439d74e29f3234a034777f88b260523afe8c0446 (patch) | |
tree | a3ee160dccfd3cf0f065edbba07290c4ba9af93d /lundump.c | |
parent | 3679d33b02782ff7d7d0fa163b815902b189c89e (diff) | |
download | lua-439d74e29f3234a034777f88b260523afe8c0446.tar.gz lua-439d74e29f3234a034777f88b260523afe8c0446.tar.bz2 lua-439d74e29f3234a034777f88b260523afe8c0446.zip |
added 'local' bit (true => object is only refered by local variables)
Diffstat (limited to 'lundump.c')
-rw-r--r-- | lundump.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lundump.c,v 2.22 2012/05/08 13:53:33 roberto Exp roberto $ | 2 | ** $Id: lundump.c,v 2.23 2013/04/26 18:48:35 roberto Exp roberto $ |
3 | ** load precompiled Lua chunks | 3 | ** load precompiled Lua chunks |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -84,9 +84,12 @@ static TString* LoadString(LoadState* S) | |||
84 | return NULL; | 84 | return NULL; |
85 | else | 85 | else |
86 | { | 86 | { |
87 | TString* ts; | ||
87 | char* s=luaZ_openspace(S->L,S->b,size); | 88 | char* s=luaZ_openspace(S->L,S->b,size); |
88 | LoadBlock(S,s,size*sizeof(char)); | 89 | LoadBlock(S,s,size*sizeof(char)); |
89 | return luaS_newlstr(S->L,s,size-1); /* remove trailing '\0' */ | 90 | ts = luaS_newlstr(S->L,s,size-1); /* remove trailing '\0' */ |
91 | nolocal(obj2gco(ts)); /* all strings here anchored in non-thread objects */ | ||
92 | return ts; | ||
90 | } | 93 | } |
91 | } | 94 | } |
92 | 95 | ||