lua-users home
lua-l archive

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


What is the reason luaL_callmeta() only allows one return value? I’m guessing it’s because it’s primarily targetted for metamethods like __add(). However, it would be great if there was a luaL_callmetax() that had an explicit argument for the number of return values (or LUA_MULTRET).

Not academic: All my projects to date have needed this (of course I’ve created my own, but it’s surprising that it’s not there for things like __pairs() etc).

—Tim