pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:300:   }      static void code_number(ptrdiff_t num, struct encode_data *data)   {    EDB(5, fprintf(stderr, "%*scode_number(%d)\n",    data->depth, "", num));    code_entry(DO_NOT_WARN(num & 15),    num >> 4, data);   }    - #ifdef _REENTRANT - static void do_enable_threads(void) - { -  exit_threads_disable(NULL); - } - #endif -  +    /* NOTE: Take care to encode it exactly as the corresponing    * type string would have been encoded (cf T_FUNCTION, T_MANY,    * T_STRING, PIKE_T_NSTRING).    */   static void encode_type(struct pike_type *t, struct encode_data *data)   {    one_more_type:    if (t->type == T_MANY) {    addchar(T_FUNCTION ^ MIN_REF_TYPE);    addchar(T_MANY);
pike.git/src/encode.c:3263:    break;    }       case 1: /* Old-style encoding. */    {    int d, in;    size_t size=0;    char *dat=0;    struct program *p;    struct object *placeholder=0; -  ONERROR err1, err2, err3, err4; +  ONERROR err, err1, err2, err3, err4;    - #ifdef _REENTRANT -  ONERROR err; -  low_init_threads_disable(); -  SET_ONERROR(err, do_enable_threads, 0); - #endif +  lock_pike_compiler(); +  SET_ONERROR(err, unlock_pike_compiler, 0);       fprintf (stderr, "Warning: Using old-style encoding\n");       EDB(2,fprintf(stderr, "%*sDecoding a program to <%d>: ",    data->depth, "", entry_id.u.integer);    print_svalue(stderr, &entry_id);    fputc('\n', stderr););       SETUP_DECODE_MEMOBJ(T_PROGRAM, program, p, low_allocate_program(),;);   
pike.git/src/encode.c:3876:    }    }else{    struct unfinished_prog_link *l;    l=ALLOC_STRUCT(unfinished_prog_link);    l->prog=p;    l->next=data->unfinished_programs;    data->unfinished_programs=l;    }    }    - #ifdef _REENTRANT -  UNSET_ONERROR(err); -  exit_threads_disable(NULL); - #endif +  CALL_AND_UNSET_ONERROR(err);    goto decode_done;    }       case 2:    decode_value2(data);    decode_value2(data);    if(TYPEOF(Pike_sp[-2]) == T_INT)    {    pop_stack();    }else{