From 678c1255c92eed9c2c7564d340a5563b17395158 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 1 Feb 2012 19:57:15 -0200 Subject: random seed used in the hash of all strings to avoid intentional collisions --- lstring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lstring.h') diff --git a/lstring.h b/lstring.h index 6cfcbfcc..b52a9356 100644 --- a/lstring.h +++ b/lstring.h @@ -1,5 +1,5 @@ /* -** $Id: lstring.h,v 1.46 2010/04/05 16:26:37 roberto Exp roberto $ +** $Id: lstring.h,v 1.48 2012/01/25 21:05:40 roberto Exp roberto $ ** String table (keep all strings handled by Lua) ** See Copyright Notice in lua.h */ @@ -34,7 +34,7 @@ #define eqshrstr(a,b) check_exp((a)->tsv.tt == LUA_TSHRSTR, (a) == (b)) -LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l); +LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed); LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b); LUAI_FUNC int luaS_eqstr (TString *a, TString *b); LUAI_FUNC void luaS_resize (lua_State *L, int newsize); -- cgit v1.2.3-55-g6feb