mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
do not makeshared to LUA_TSHRSTR
This commit is contained in:
@@ -950,7 +950,6 @@ new_string(unsigned int h, const char *str, lu_byte l) {
|
||||
memset(ts, 0, sz);
|
||||
setbits(ts->marked, WHITEBITS);
|
||||
gray2black(ts);
|
||||
makeshared(ts);
|
||||
ts->tt = LUA_TSHRSTR;
|
||||
ts->hash = h;
|
||||
ts->shrlen = l;
|
||||
|
||||
@@ -47,7 +47,8 @@ mark_shared(lua_State *L) {
|
||||
case LUA_TSTRING: {
|
||||
const char *str = lua_tostring(L, idx);
|
||||
TString *ts = (TString *)(str - sizeof(UTString));
|
||||
makeshared(ts);
|
||||
if(ts->tt==LUA_TLNGSTR)
|
||||
makeshared(ts);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user