Branch: Tag:

2003-06-05

2003-06-05 01:07:16 by Martin Stjernholm <mast@lysator.liu.se>

Reintroduced a kludge for the time being to avoid (hopefully) the
infinite recursion problem during dumping.

Rev: lib/master.pike.in:1.287

6:   // Pike is distributed under GPL, LGPL and MPL. See the file COPYING   // for more information.   // - // $Id: master.pike.in,v 1.286 2003/06/02 19:18:56 mast Exp $ + // $Id: master.pike.in,v 1.287 2003/06/05 01:07:16 mast Exp $      #pike __REAL_VERSION__   
676:    resolv_debug ("low_findprog %s: decoding dumped\n", fname);    INC_RESOLV_MSG_DEPTH();    ret = decode_value(master_read_file(oname), -  (handler && handler->Decoder || -  Decoder)(fname, mkobj)); +  (handler && handler->get_codec || +  get_codec)(fname, mkobj));    DEC_RESOLV_MSG_DEPTH();    resolv_debug ("low_findprog %s: dump decode ok\n", fname);    return programs[fname] = ret;
3454:    }   }    + mapping(string:Codec) codecs = set_weak_flag(([]),1); + Codec get_codec(string|void fname, int|void mkobj) + { +  string key = fname + "\0" + mkobj; +  if (codecs[key]) return codecs[key]; +  return codecs[key] = Decoder(fname, mkobj); + } +    class Codec   //! @[Encoder] and @[Decoder] rolled into one. This is for mainly   //! compatibility; there's typically no use combining encoding and