mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
Fix #2060
This commit is contained in:
@@ -59,6 +59,8 @@ int luaS_eqshrstr (TString *a, TString *b) {
|
|||||||
void luaS_share (TString *ts) {
|
void luaS_share (TString *ts) {
|
||||||
if (ts == NULL || isshared(ts))
|
if (ts == NULL || isshared(ts))
|
||||||
return;
|
return;
|
||||||
|
if (ts->tt == LUA_VLNGSTR)
|
||||||
|
luaS_hashlongstr(ts);
|
||||||
makeshared(ts);
|
makeshared(ts);
|
||||||
ts->id = ATOM_FDEC(&STRID)-1;
|
ts->id = ATOM_FDEC(&STRID)-1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user