1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 08:29:04 +00:00

Upgrading to Lua 5.2.1. (Should be harmless upgrade, bug-fix only.)

This commit is contained in:
batrick
2012-06-16 06:02:57 +00:00
parent 8ad2c789b9
commit 9a0e881b2b
36 changed files with 926 additions and 606 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lstring.h,v 1.46 2010/04/05 16:26:37 roberto Exp $
** $Id: lstring.h,v 1.49 2012/02/01 21:57:15 roberto Exp $
** String table (keep all strings handled by Lua)
** See Copyright Notice in lua.h
*/
@@ -23,11 +23,20 @@
/*
** as all string are internalized, string equality becomes
** pointer equality
** test whether a string is a reserved word
*/
#define eqstr(a,b) ((a) == (b))
#define isreserved(s) ((s)->tsv.tt == LUA_TSHRSTR && (s)->tsv.extra > 0)
/*
** equality for short strings, which are always internalized
*/
#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, 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);
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);