[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: rename LUA_RIDX_CPCALL to LUA_RIDX_CCALL? (5.2.0-work2)
- From: M Joonas Pihlaja <jpihlaja@...>
- Date: Mon, 29 Mar 2010 09:27:19 +0300 (EEST)
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
otherwise.
Cheers,
Joonas