Branch: Tag:

2008-12-22

2008-12-22 14:52:40 by Martin Stjernholm <mast@lysator.liu.se>

Allow rxml_var_eval to return this without creating a loop.

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

2:   //   // Created 1999-07-30 by Martin Stjernholm.   // - // $Id: module.pmod,v 1.387 2008/12/22 10:35:40 mast Exp $ + // $Id: module.pmod,v 1.388 2008/12/22 14:52:40 mast Exp $      // Kludge: Must use "RXML.refs" somewhere for the whole module to be   // loaded correctly.
1363:    //! through subindexing. Either @[RXML.nil] or the undefined value    //! may be returned if the variable doesn't have a value.    //! +  //! If an object with an @[rmxl_var_eval] function is returned, then +  //! that function is called in turn to produce the real value. As a +  //! special case, if @[rxml_var_eval] returns this object, the +  //! object itself is used as value. +  //!    //! If the @[type] argument is given, it's the type the returned    //! value should have. If the value can't be converted to that type,    //! an RXML error should be thrown. If you don't want to do any
5163:    val_obj = 0;    break;    } +  else if (val == val_obj) +  break;    val_obj = 0;    }    }
5193:    ctx, index, scope_name, want_type)) ||    val == nil)    return ([])[0]; +  else if (val == val_obj) +  return val;   #ifdef MODULE_DEBUG    else if (mixed err = want_type && catch (want_type->type_check (val)))    if (objectp (err) && ([object] err)->is_RXML_Backtrace)