pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:18:   #include "pike_error.h"   #include "operators.h"   #include "builtin_functions.h"   #include "module_support.h"   #include "fsort.h"   #include "threads.h"   #include "stuff.h"   #include "version.h"   #include "bignum.h"    - RCSID("$Id: encode.c,v 1.91 2002/04/15 11:54:39 grubba Exp $"); + RCSID("$Id: encode.c,v 1.92 2002/04/15 12:23:28 grubba Exp $");      /* #define ENCODE_DEBUG */      /* Use the old encoding method for programs. */   #define OLD_PIKE_ENCODE_PROGRAM      #ifdef ENCODE_DEBUG   /* Pass a nonzero integer as the third arg to encode_value,    * encode_value_canonic and decode_value to activate this debug. */   #define EDB(N,X) do if (data->debug>=N) {X;} while (0)
pike.git/src/encode.c:785:    code_number(p->inherits[d].parent_offset,data);    code_number(p->inherits[d].parent_identifier,data);    code_number(p->inherits[d].storage_offset,data);       if(p->inherits[d].parent)    {    ref_push_object(p->inherits[d].parent);    Pike_sp[-1].subtype=p->inherits[d].parent_identifier;    Pike_sp[-1].type=T_FUNCTION;    EDB(3,fprintf(stderr,"INHERIT%x coded as func { %p, %d }\n", -  p->id, p->inherits[d].parent, p->inherits[d].parent_iden - tifier);); +  p->id, p->inherits[d].parent, p->inherits[d].parent_identifier););    }else if(p->inherits[d].prog){    ref_push_program(p->inherits[d].prog);    }else{    Pike_error("Failed to encode inherit #%d\n", d);    push_int(0);    }    encode_value2(Pike_sp-1,data);    pop_stack();       adddata3(p->inherits[d].name);
pike.git/src/encode.c:1148: Inside #if 0
   inh->prog->identifier_references[i].id_flags;    }    inherit_flags_change &= ~(ID_HIDDEN|ID_INHERITED);    code_number(inherit_flags_change);       /* name */    str_sval.u.string = inh->name;    encode_value2(&str_sval, data);       /* prog */ -  if (inh->prog) { +     ref_push_program(inh->prog); -  } else { -  push_int(0); -  Pike_sp[-1].subtype = NUMBER_UNDEFINED; -  } +     encode_value2(Pike_sp-1, data);    pop_stack();       /* parent */ -  +  if (inh->prog) {    ref_push_object(inh->parent); -  +  } else { +  push_int(0); +  Pike_sp[-1].subtype = NUMBER_UNDEFINED; +  }    encode_value2(Pike_sp-1, data);    pop_stack();       /* parent_identifier */    code_number(inh->parent_identifier);       /* parent_offset */    code_number(inh->parent_offset);       d += inh->prog->num_identifier_references;