[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lua_pushlightuserdata fed with NULL pointer
- From: GrayFace <sergroj@...>
- Date: Sun, 24 Oct 2010 23:46:25 +0700
On 24.10.2010 19:27, Shmuel Zeigerman wrote:
1. lua_pushstring(L, NULL) is equivalent to lua_pushnil(L).
2. lua_pushlightuserdata(L, NULL) pushes light userdata with null value.
I would suggest (for Lua 5.2) making case 2 above to behave as case 1,
since there is no (easy) way to find out from Lua script if it was the
Someone may be using light userdata for integer values, like array indexes.
On a side note, I'm used to NULL char* being an empty string. That's how
empty strings are represented in Delphi.
Sergey Rozhenko mailto:firstname.lastname@example.org