From a4b96ce9a3305ae3585c0bb143fa7342c140f20b Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 25 Jan 2012 19:05:40 -0200
Subject: first implementation of long strings

---
 lstring.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'lstring.h')

diff --git a/lstring.h b/lstring.h
index 462bcc87..6cfcbfcc 100644
--- a/lstring.h
+++ b/lstring.h
@@ -25,15 +25,18 @@
 /*
 ** test whether a string is a reserved word
 */
-#define isreserved(s)	((s)->tsv.extra > 0)
+#define isreserved(s)	((s)->tsv.tt == LUA_TSHRSTR && (s)->tsv.extra > 0)
 
 
 /*
-** equality for strings, which are always internalized
+** equality for short strings, which are always internalized
 */
-#define luaS_eqstr(a,b)		((a) == (b))
+#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 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);
 LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
 LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
-- 
cgit v1.2.3-55-g6feb