[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: localized errors for allocating new objects
- From: M Joonas Pihlaja <jpihlaja@...>
- Date: Tue, 30 Mar 2010 02:30:54 +0300 (EEST)
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