LUA String Table

Started by
-1 comments, last by Ranger_One 17 years, 10 months ago
So, I was looking at the LuaGL source. They use strings like "QUADS" to represent the enumerated values inside GL. I was shocked to see them comparing strings from LUA to C with strncmp()! Now here was my thought: Lua has a string table of unique strings. Just do this: Register the string inside lua, so that it gets entered into the table. Compare the unique table pointer to a stored one for comparison. Am I missing something? This seems like something that is easy, way faster, and should work.

This topic is closed to new replies.

Advertisement