lua-users home
lua-l archive

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

My main issue is that when passing a table as a parameter it is a huge pain to use getfield and then clean everything up before pushing your return value(s) and returning.  Normally function parameters are always available on the stack and you don't have to pop them before returning.  The table is available on the stack but you can't use it without putting more stuff on the stack that will need to be cleaned up later.

If you can getfield and then immediately take the value off the stack that would make the code a lot cleaner.

Or possibly if there was a function like:

const char* lua_getstringfield(lua_State* L, int idx, const char* fieldname)

That would get a string value from a table without putting anything on the stack.

// Chris