Branch: Tag:

2000-05-11

2000-05-11 04:30:25 by Martin Stjernholm <mast@lysator.liu.se>

Use constants to recognize dir- and joinnodes. It doesn't work to do
things like object_program(foo) == dirnode, since object_program()
tries to look up the function identifier in the parent object, and
that will be different if something inherits the master and replaces
it.

Rev: lib/master.pike.in:1.118

1:   /* -*- Pike -*-    * -  * $Id: master.pike.in,v 1.117 2000/05/07 00:39:52 hubbe Exp $ +  * $Id: master.pike.in,v 1.118 2000/05/11 04:30:25 mast Exp $    *    * Master-file for Pike.    *
588:      class dirnode   { +  constant is_resolv_dirnode = 1;    string dirname;    mixed module=module_checker();    mapping(string:mixed) cache=([]);
710:      class joinnode   { +  constant is_resolv_joinnode = 1;    array(object|mapping) joined_modules;    mapping(string:mixed) cache=([]);   
727:    if (!zero_type(ret = o[index]))    {    if (objectp(ret = o[index]) && -  (< joinnode, dirnode >)[object_program(ret)]) +  (object_program(ret)->is_resolv_dirnode || +  object_program(ret)->is_resolv_joinnode))    {    // Only join directorynodes (or joinnodes).    res += ({ ret });
845:    string file=combine_path(path,identifier);    if(mixed ret=findmodule(file)) {    if ((objectp(ret)) && -  (< joinnode, dirnode >)[object_program(ret)]) { +  (object_program(ret)->is_resolv_dirnode || +  object_program(ret)->is_resolv_joinnode)) {    if (mixed new_ret = ret->_module_value) {    ret = new_ret;    }