This patch makes Lua symbols and table keys case-insensitive. Constant tables and the string pool are kept case-sensitive. And a function is exported to toggle the case-sensitive flag on select tables (but only prior to inserting elements). I'm using two of the extra bits in Table.flags: bit 7 is set when the table ignores case, bit 8 is set when the table has not been modified. TString gets an extra unsigned int for the folded hash. It makes Lua, an already simple an unintimidating language, even simpler and less intimidating for people who are used to using things such as Basic. Because it's far easier to modify Lua than it is the end users. Actually, I just wanted to see if it could be done and learn the internals along the way. -- tom telliamed@whoopdedo.org
Attachment:
lua514-caseinsensitive.diff.gz
Description: Binary data