Skip to main content
GameDev.net gamedev.net
🔒 Locked

LUA String Table

Started by Ranger_One Jun 11, 2006 at 9:49 AM 0 replies 1.6k views
Original Post
Ranger_One
Ranger_One
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.