lua-users home
lua-l archive

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


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.