lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 22-3-2012 09:13, Enrico Colombini wrote:
On 21/03/2012 21.44, Roberto Ierusalimschy wrote:
#define LUA_MAXSHORTLEN (8 * sizeof(void*))

Shouldn't it perhaps be better to put it in luaconf.h? Or is it in
llimits.h because it's supposed to be changed very rarely?

A second point: does "should not be larger than 255" mean there is no
way to disable it and restore the previous behavior?
Maybe "0=all strings are interned" could be useful in case some program
had trouble with the new system (e.g. I can think of some sort of text
processing, such as a translation helper that uses chunks of already
translated text as table indexes).
Assuming no underlying change or new optimization prevents this, of course.

Indeed. I'm pretty sure that I use very long strings as index all over the place. But does this patch indeed prevent long strings to be unique indices? For me the interning of strings is one of the charms of Lua.

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------