lua-users home
lua-l archive

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


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 null pointer.

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.

--
Best regards,
Sergey Rozhenko                 mailto:sergroj@mail.ru