[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua Lanes with package.preload and package.loader
- From: Benoit Germain <bnt.germain@...>
- Date: Fri, 18 Nov 2011 12:58:25 +0100
2011/11/18 Greg <tghill@hotmail.com>:
>
> Now I am getting another error:
> bad argument #-10003 to 'configure' (string expected, got number)
>
> It is from lanes.c:2341
>
> LUAG_FUNC( configure )
> {
> char const *name = luaL_checkstring( L, lua_upvalueindex( 1));
> int const nbKeepers = luaL_optint( L, 1, 1);
> ...
>
> Where is upvalue 1 set? Is this the upvalue I should be eliminating?
>
No, this is an internal upvalue I set for the lua51-lanes module's
configure() function (see luaopen_lanes at the end of lanes.c).
This function receives two upvalues. upvalue #1 (-> index -10003) is
the module name received by the function luaopen_lanes() when
lua51-lanes is required in lanes.lua.
I don't see how this could ever be anything else than a string.
--
Benoit.