lua-users home
lua-l archive

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

On Sat, 13 Mar 2010, David Manura wrote:

> One thing maybe still lacking in the use case in [1] is a way to push
> string and heavy userdata arguments without the immediate danger of a
> longjump.  Maybe a a lua_pushlstringornil could push nil upon failure
> to allocate memory for the string.

Fast error status returning versions of lua_pushlstring and 
lua_newuserdata() would be most welcome to me.  The dance required to 
get strings and boxed pointers passed to lua callbacks is borderline 
ridiculous. :)

On a tangential note I often have a pushstringornil(char const *) 
function which will push nil for a NULL argument and the string