[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc2) now available
- From: Peter Cawley <lua@...>
- Date: Wed, 22 Jun 2011 15:15:39 +0100
On Wed, Jun 22, 2011 at 3:10 PM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
> There seems to be another problem with the function approach (assuming
> an opaque structure). A subtle detail when creating files in Lua is
> that the creation of the userdata may fail (memory error). So, if the
> user opens a file and then calls this new function, Lua may raise an
> error and the open file is lost forever.
Then make this new function return NULL rather than throwing an error.