From c2361e0b6108a2e7e53dcfcdc3a569fcc4a1e31d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 11 May 2012 11:14:42 -0300 Subject: [PATCH] definition for 'LUAI_MAXSHORTLEN' moved to luaconf.h (too important) --- lstring.c | 13 +------------ luaconf.h | 9 ++++++++- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/lstring.c b/lstring.c index 3d0b1974..1fbce6e7 100644 --- a/lstring.c +++ b/lstring.c @@ -1,5 +1,5 @@ /* -** $Id: lstring.c,v 2.22 2012/02/01 21:57:15 roberto Exp roberto $ +** $Id: lstring.c,v 2.23 2012/03/28 18:28:25 roberto Exp roberto $ ** String table (keeps all strings handled by Lua) ** See Copyright Notice in lua.h */ @@ -18,17 +18,6 @@ #include "lstring.h" -/* -** maximum length for short strings, that is, strings that are -** internalized. (Cannot be smaller than reserved words or tags -** for metamethods, as these strings must be internalized; -** #("function") = 8, #("__newindex") = 10.) -*/ -#if !defined(LUAI_MAXSHORTLEN) -#define LUAI_MAXSHORTLEN 40 -#endif - - /* ** Lua will use at most ~(2^LUAI_HASHLIMIT) bytes from a string to ** compute its hash diff --git a/luaconf.h b/luaconf.h index 50425b81..77b462a3 100644 --- a/luaconf.h +++ b/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.170 2011/12/06 16:58:36 roberto Exp roberto $ +** $Id: luaconf.h,v 1.171 2012/05/11 14:10:50 roberto Exp roberto $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -223,6 +223,13 @@ (fprintf(stderr, (s), (p)), fflush(stderr)) +/* +@@ LUAI_MAXSHORTLEN is the maximum length for short strings, that is, +** strings that are internalized. (Cannot be smaller than reserved words +** or tags for metamethods, as these strings must be internalized; +** #("function") = 8, #("__newindex") = 10.) +*/ +#define LUAI_MAXSHORTLEN 40