From a4b96ce9a3305ae3585c0bb143fa7342c140f20b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 25 Jan 2012 19:05:40 -0200 Subject: first implementation of long strings --- llimits.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'llimits.h') diff --git a/llimits.h b/llimits.h index 7cf2048b..5466a6b6 100644 --- a/llimits.h +++ b/llimits.h @@ -1,5 +1,5 @@ /* -** $Id: llimits.h,v 1.94 2011/11/29 15:39:48 roberto Exp roberto $ +** $Id: llimits.h,v 1.95 2011/12/06 16:58:36 roberto Exp roberto $ ** Limits, basic types, and some other `installation-dependent' definitions ** See Copyright Notice in lua.h */ @@ -124,6 +124,15 @@ typedef LUAI_UACNUMBER l_uacNumber; #define MAXUPVAL UCHAR_MAX +/* +** maximum length for short strings, that is, strings that are +** internalized. (Cannot be smaller than reserved words or tags +** for metamethods; #"function" = 8, #"__newindex" = 10; should +** not be larger than 255, to allow future changes) +*/ +#define LUA_MAXSHORTLEN (8 * sizeof(void*)) + + /* ** type for virtual-machine instructions ** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) -- cgit v1.2.3-55-g6feb