lua-users home
lua-l archive

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


> > Will this still work in 5.1? I mean -- will the redirection of
> "_ALERT" to a
> > C-call still catch run-time error messages.
>
> No. _ALERT will be removed in 5.1. Use lua_cpcall like lua.c.
> --lhf
>

Thanks. In other words, you mean -- wherever my C++ code calls lua code,
explicity check the return status, and if it is non-zero, call
lua_tostring(L, -1) for the error message.

That shouldn't be too much work to port -- since all calls into Lua code are
localized. Probably the easiest way to port would be to wrap all my "call
lua" code in one place, and call that function.

Again, thanks.

Does taking out the call to _ALERT improve performance, or was it deprecated
for some other reason?

--
Quinn Tyler Jackson

http://members.shaw.ca/qjackson/