lua-users home
lua-l archive

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


I noticed today that lua_load performs a protected call to the parser,
and re-uses the currently set error handler for the protected call. I
am wondering whether this reuse is commonly known knowledge, and also
whether this reuse is wise. In particular, if people are not aware of
this, then they might write stateful error handlers which expect to
only get called once, and expect control to immediately return to the
original lua_pcall after they return. These two assumptions (which I
previously considered reasonable) could both be broken by (multiple)
calls to load.