mirror of
https://github.com/lua/lua
synced 2026-09-27 00:28:25 +03:00
detail
This commit is contained in:
parent
ad60b3ead7
commit
62790ab15d
1 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lstring.c,v 2.8 2005/12/22 16:19:56 roberto Exp roberto $
|
||||
** $Id: lstring.c,v 2.9 2006/07/11 15:53:29 roberto Exp roberto $
|
||||
** String table (keeps all strings handled by Lua)
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
@ -82,7 +82,8 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
|
|||
o != NULL;
|
||||
o = o->gch.next) {
|
||||
TString *ts = rawgco2ts(o);
|
||||
if (ts->tsv.len == l && (memcmp(str, getstr(ts), l) == 0)) {
|
||||
if (h == ts->tsv.hash && ts->tsv.len == l &&
|
||||
(memcmp(str, getstr(ts), l) == 0)) {
|
||||
/* string may be dead */
|
||||
if (isdead(G(L), o)) changewhite(o);
|
||||
return ts;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue