Branch: Tag:

2000-02-13

2000-02-13 00:33:33 by Martin Stjernholm <mast@lysator.liu.se>

Fixed type check on objects in Frame._exec_array().

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

2:   //!   //! Created 1999-07-30 by Martin Stjernholm.   //! - //! $Id: module.pmod,v 1.49 2000/02/12 21:24:03 mast Exp $ + //! $Id: module.pmod,v 1.50 2000/02/13 00:33:33 mast Exp $      //! Kludge: Must use "RXML.refs" somewhere for the whole module to be   //! loaded correctly.
1491:    subparser = 0;    }    break; -  case "object": +  case "mapping": +  error ("Header mappings not yet implemented.\n"); +  break; +  case "multiset": +  if (sizeof ([multiset] elem) == 1) piece = ((array) elem)[0]; +  else if (sizeof ([multiset] elem) > 1) +  error (sizeof ([multiset] elem) + " values in multiset in exec array.\n"); +  else error ("No value in multiset in exec array.\n"); +  break; +  default: +  if (objectp (elem)) +  // Can't count on that sprintf ("%t", ...) on an object +  // returns "object".    if (([object] elem)->is_RXML_Frame) {    ([object(Frame)] elem)->_eval (0); // Might unwind.    piece = ([object(Frame)] elem)->result;
1503:    }    else    error ("File objects not yet implemented.\n"); -  break; -  case "mapping": -  error ("Header mappings not yet implemented.\n"); -  break; -  case "multiset": -  if (sizeof ([multiset] elem) == 1) piece = ((array) elem)[0]; -  else if (sizeof ([multiset] elem) > 1) -  error (sizeof ([multiset] elem) + " values in multiset in exec array.\n"); -  else error ("No value in multiset in exec array.\n"); -  break; -  default: +  else    error ("Invalid type %t in exec array.\n", elem);    }