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.129 2001/09/24 14:25:54 grubba Exp $"); + RCSID("$Id: encode.c,v 1.130 2001/10/05 01:30:12 hubbe Exp $");      /* #define ENCODE_DEBUG */      #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)   #else   #define EDB(N,X) do {} while (0)   #endif
pike.git/src/encode.c:2108: Inside #if defined(_REENTRANT)
  #ifdef _REENTRANT    ONERROR err;    low_init_threads_disable();    SET_ONERROR(err, do_enable_threads, 0);   #endif       p=low_allocate_program();    SET_ONERROR(err3, zap_unfinished_program, p);       debug_malloc_touch(p); +  if(data->codec) +  { +  ref_push_program(p); +  apply(data->codec, "__register_new_program", 1); +  pop_stack(); +  }    tmp.type=T_PROGRAM;    tmp.u.program=p;    EDB(2,fprintf(stderr, "%*sDecoding a program to <%d>: ",    data->depth, "", data->counter.u.integer);    print_svalue(stderr, &tmp);    fputc('\n', stderr););    mapping_insert(data->decoded, & data->counter, &tmp);    data->counter.u.integer++;    p->refs--;   
pike.git/src/encode.c:2383:    Pike_compiler->new_program=p;    fsort((void *)p->identifier_index,    p->num_identifier_index,    sizeof(unsigned short),(fsortfun)program_function_index_compare);    Pike_compiler->new_program=new_program_save;    }       debug_malloc_touch(dat);    debug_malloc_touch(p);    p->flags |= PROGRAM_PASS_1_DONE | PROGRAM_FIXED; +  if(data->codec) +  { +  ref_push_program(p); +  apply(data->codec, "__register_new_object", 1); +  pop_stack(); +  } +     for(d=0;d<p->num_constants;d++)    {    decode_value2(data);    p->constants[d].sval=*--Pike_sp;    dmalloc_touch_svalue(Pike_sp);    getdata3(p->constants[d].name);    }    data->pickyness--;