lua-users home
lua-l archive

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

> This structure implies that LUAI_MAXSHORTLEN must not be
> set to more than 255, right?

Yes. (The default value is 40.)

> The reference manual does not use the phrases 'short string'
> and 'long string' nor the word 'internalized', so these must count
> as implemetation details.


> I'm curious: when a long string is used as a key in a table, will
> at that stage the string be internalized?

No. At that point, the string can already have two different instances
in Lua. Moreover, for every new long string, we would have to check
whether it has been internalized (which is the heaviest part of

-- Roberto