lua-users home
lua-l archive

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

On Thu Jan 31 12:00 , 'Hu Qiwei' <> sent:

>I've tried the code, it works but the result shows:
>nil   2   3   4
>so I will fix this bug later.

I'd believe that.. it'd be very hard and/or inefficient to get a completely well
behaving try finally.

Also, a very minor bug fix:
) Either link the struct in to the GC (probably easiest method)
) or: Store the try block in local variables on the stack (would also stop the
try block from ever failing due to a memerr)
) or: Put the try structs in to a linked list that's stored with the state.

I could be wrong, but without one of the above being implemented I'm pretty sure
the application leaks memory should a coroutine (that is inside a try block) be

Oh, and sorry about the double post. (the server was giving me a message not
authorized message, and then decided to post both).

Love the patch btw.

- Alex