Branch: Tag:

2001-02-18

2001-02-18 13:40:53 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

added cast method in FakedVariables

Rev: server/base_server/prototypes.pike:1.16

1:   #include <stat.h>   #include <config.h>   #include <module_constants.h> - constant cvs_version="$Id: prototypes.pike,v 1.15 2001/02/07 19:41:45 per Exp $"; + constant cvs_version="$Id: prototypes.pike,v 1.16 2001/02/18 13:40:53 mirar Exp $";      class Variable   {
400:    }    }    -  +     static this_program `|( mapping what )    {    foreach( indices(what), string q )`[]=( q,what[q] );
418:    foreach( indices(what), string q )`[]=( q,what[q] );    return this_object();    } +  +  static mapping cast(string to) +  { +  if (to[..6]=="mapping") +  return copy_value(real_variables); +  error("can't cast to %O\n",to);    } -  + }      class RequestID   //! The request information object contains all request-local information and