lua-users home
lua-l archive

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



RLake@oxfam.org.pe wrote:
Peter Shook escribió:
Okay, good point.  But I'm sure Jean Claude has translated this example
to C and used either lua_rawget or lua_gettable, in which case there
isn't much difference.


There is, though, there is. It's very important to get this right.

Okay, I'll be more careful so that others don't pick up my bad habbits.

I'm well aware of the difference. But when I'm not doing anything fancy, and I'm certain a table doesn't have a metatable, I've always had a preference for lua_rawget. For me it's a mnemonic for "not doing anything fancy with this table." Maybe I should start using comments instead ;)

- Peter