lua-users home
lua-l archive

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

On Wed, Jun 25, 2014 at 5:57 AM, Philipp Janda <> wrote:
> The sentinel is not a table but a lightuserdata, so maybe the bug is in the
> current version of `require51` ...
> E.g. both `luaL_register` and the `module` function assume that the sentinel
> is _not_ a table (the C searcher has nothing to do with it, neither does the
> C loader unless it calls `luaL_register` with a non-NULL library name). Even
> with a non-table sentinel, `require51` doesn't work correctly with a module
> that uses `module` or `luaL_register` and doesn't return a value.
> Also, the searcher can be any callable object, but the loader has to be a
> function.

You're right on both counts, it felt into place overnight :-).
`newproxy()` to the rescue.