Hi Invisible,
Stephan Weinberger schrieb:
> I'm having difficulties figuring out the output of closure_to_string():
>
> e.g. when I get output like
>
> #'domains/huegelland/thyrsis/ratstempel/room/gang_034(domains/huegelland/thyrsis/ratstempel/room/gang_034)->check_workroom()
> from domains/huegelland/thyrsis/ratstempel/room/std_gang.c line 43
>
> What do the different parts mean?
The full format is
#'[bound object]target object(target inherit)->function name()
from creating program
> I'm particularly confused about the first two parts; why the duplication?
How did you create that closure? And this something happen to the object
like a replace_program()?
Normally the second part will only be printed if the target program
(inherit) is a different than the main program (object).
> From what I can see in the code, the part in brackets is added if
> "is_inherited" is true, but this seems to be set as soon as the objects
> inherits anything (i.e. basically always)
is_inherited is set, if the closure has a non-NULL .inhProg entry or
the function lookup revealed an inherit, see closure_lookup_lfun_prog().
> and the closure is from one of the
> inherits (which is printed as "from ... line ..." anyways).
The from line is about the creation of the closure, that could be an
entirely different program (e.g. when using symbol_function()).
> So the info
> seems kinda redundant, unless I'm missing something.
>
>
> Also as a sidenote: we're running native mode, so shouldn't the program
> names start with "/" (like they do with program_name())?
Yes, they should. We haven't fixed all those missing slashes in fear we
would break mudlibs. This will be part of the cleanup for LDMud 3.7.
Greetings,
Gnomi