Skip to content

Commit d19f1da

Browse files
committedJan 23, 2012
new macro 'isreserved' + 'eqstr' -> 'luaS_eqstr' (may be a function)
1 parent f88806a commit d19f1da

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed
 

‎lstring.h

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
** $Id: lstring.h,v 1.45 2010/04/03 20:24:18 roberto Exp roberto $
2+
** $Id: lstring.h,v 1.46 2010/04/05 16:26:37 roberto Exp roberto $
33
** String table (keep all strings handled by Lua)
44
** See Copyright Notice in lua.h
55
*/
@@ -23,10 +23,16 @@
2323

2424

2525
/*
26-
** as all string are internalized, string equality becomes
27-
** pointer equality
26+
** test whether a string is a reserved word
2827
*/
29-
#define eqstr(a,b) ((a) == (b))
28+
#define isreserved(s) ((s)->tsv.extra > 0)
29+
30+
31+
/*
32+
** equality for strings, which are always internalized
33+
*/
34+
#define luaS_eqstr(a,b) ((a) == (b))
35+
3036

3137
LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
3238
LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);

0 commit comments

Comments
 (0)
Please sign in to comment.