mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
Merge pull request #435 from niuys/patch-1
reduce needless 'add_string' call
This commit is contained in:
@@ -419,8 +419,11 @@ luaS_clonestring(lua_State *L, TString *ts) {
|
|||||||
result = query_ptr(ts);
|
result = query_ptr(ts);
|
||||||
if (result)
|
if (result)
|
||||||
return result;
|
return result;
|
||||||
// ts is not in SSM, so recalc hash, and add it to SSM
|
|
||||||
h = luaS_hash(str, l, 0);
|
h = luaS_hash(str, l, 0);
|
||||||
|
result = query_string(h, str, l);
|
||||||
|
if (result)
|
||||||
|
return result;
|
||||||
|
// ts is not in SSM, so recalc hash, and add it to SSM
|
||||||
return add_string(h, str, l);
|
return add_string(h, str, l);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user