From 55ac40f859ad8e28fe71a8801d49f4a4140e8aa3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 20 Jun 2024 13:43:33 -0300 Subject: Cleaning of llimits.h Several definitions that don't need to be "global" (that is, that concerns only specific parts of the code) moved out of llimits.h, to more appropriate places. --- lstring.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lstring.h') diff --git a/lstring.h b/lstring.h index b7226d83..c88357aa 100644 --- a/lstring.h +++ b/lstring.h @@ -19,6 +19,17 @@ #define MEMERRMSG "not enough memory" +/* +** 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 + + /* ** Size of a short TString: Size of the header plus space for the string ** itself (including final '\0'). -- cgit v1.2.3-55-g6feb