Branch: Tag:

2001-02-18

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

added cast method in FakedVariables

Rev: server/base_server/prototypes.pike:1.17

1:   #include <stat.h>   #include <config.h>   #include <module_constants.h> - constant cvs_version="$Id: prototypes.pike,v 1.16 2001/02/18 13:40:53 mirar Exp $"; + constant cvs_version="$Id: prototypes.pike,v 1.17 2001/02/18 13:50:35 mirar Exp $";      class Variable   {
421:    static mapping cast(string to)    {    if (to[..6]=="mapping") -  return copy_value(real_variables); +  { +  array v=indices(real_variables); +  return mkmapping(v,map(v,`[])); +  } +     error("can't cast to %O\n",to);    }   }