lua-users home
lua-l archive

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


First, let me say: Very cool.

But now a quibble.

You removed lua_cpcall on the basis that it was redundant. Note, however,
that lua_cpcall catches errors from the case where there is no room to push
the function and the light userdata.

To really make it redundant, I think one would need something like the
following:

1. Support for testing whether space was available on the stack without
throwing.

2. Support for "light C functions" -- i.e., functions that could be
represented purely as TValues rather than as garbage collectable entities.

Then one could check for stack space for the two items, push a light C
function and a light userdata, and then execute the pcall.

Mark