lua-users home
lua-l archive

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


On Mon, 29 Mar 2010, Drake Wilson wrote:

> The functions whose plain counterparts return pointers (pushlstring,
> newuserdata, newthread) would return NULL on failure; the functions
> whose plain counterparts return void (createtable, pushcclosure) would
> return 1 on success or 0 on failure.  Failure would push nothing,
> rather than nil

I'd prefer every such function to use the same kind of error indicator 
rather than a mix of pointers and integers.  Especially as I'm told 
lua_pushstring() does/will accept NULL as a valid argument and pushes 
nil then.

Joonas