Branch: Tag:

2000-01-23

2000-01-23 06:20:31 by Martin Nilsson <mani@lysator.liu.se>

Attempt to merge scope object with scope mapping in extend_scope, otherwise overwrite.

Rev: server/etc/modules/RXML.pmod/module.pmod:1.31

2:   //!   //! Created 1999-07-30 by Martin Stjernholm.   //! - //! $Id: module.pmod,v 1.30 2000/01/23 02:59:20 nilsson Exp $ + //! $Id: module.pmod,v 1.31 2000/01/23 06:20:31 nilsson Exp $      //! Kludge: Must use "RXML.refs" somewhere for the whole module to be   //! loaded correctly.
637:    add_scope (scope_name, vars);    return ;    } +  if (objectp(vars)) { +  if (!mappingp(scopes[scope_name])) { +  add_scope (scope_name, vars); +  return; +  } +  mapping tmp = scopes[scope_name]; +  add_scope (scope_name, vars); +  vars = tmp; +  }    foreach (indices(vars), string var)    set_var(var, vars[var], scope_name);    }