pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:823:    if (val->u.mapping->data->ind_types & ~(BIT_BASIC & ~BIT_TYPE))    /* This doesn't let bignums through. That's necessary as    * long as they aren't handled deterministically by the    * sort function. */    /* They should be handled deterministically now - Hubbe */    Pike_error("Canonical encoding requires basic types in indices.\n");    }    order = get_switch_order(Pike_sp[-2].u.array);    order_array(Pike_sp[-2].u.array, order);    order_array(Pike_sp[-1].u.array, order); -  free((char *) order); +  free(order);    }       code_entry(TAG_MAPPING, Pike_sp[-2].u.array->size,data);    for(i=0; i<Pike_sp[-2].u.array->size; i++)    {    encode_value2(ITEM(Pike_sp[-2].u.array)+i, data, 0); /* indices */    encode_value2(ITEM(Pike_sp[-1].u.array)+i, data, 0); /* values */    }    pop_n_elems(2);    /* FIXME: What about flags? */
pike.git/src/encode.c:861:    if (multiset_ind_types(l) & ~(BIT_BASIC & ~BIT_TYPE))    /* This doesn't let bignums through. That's necessary as    * long as they aren't handled deterministically by the    * sort function. */    Pike_error("Canonical encoding requires basic types in indices.\n");    }    check_stack(1);    push_array(multiset_indices(l));    order = get_switch_order(Pike_sp[-1].u.array);    order_array(Pike_sp[-1].u.array, order); -  free((char *) order); +  free(order);    for (i = 0; i < Pike_sp[-1].u.array->size; i++)    encode_value2(ITEM(Pike_sp[-1].u.array)+i, data, 0);    pop_stack();    }    else {    struct svalue ind;    union msnode *node = low_multiset_first (l->msd);    for (; node; node = low_multiset_next (node))    encode_value2 (low_use_multiset_index (node, ind), data, 0);    }
pike.git/src/encode.c:3801:    pp);       pp->flags &=~ PROGRAM_AVOID_CHECK;    pp->flags |= PROGRAM_FINISHED;      #ifdef PIKE_DEBUG    check_program(pp);   #endif /* PIKE_DEBUG */       *ptr = l->next; -  free((char *)l); +  free(l);    }else{    ptr=&l->next;    }    }    }       /* Go through the linked list of unfinished objects    * to see what objects are now finished.    */    {
pike.git/src/encode.c:3845:    ptr=&l->next;    continue;    }    }       /* Note: We steal the references from l. */    push_object(o);    *(Pike_sp++) = l->decode_arg;       *ptr = l->next; -  free((char *)l); +  free(l);       /* Let the codec do it's job... */    apply_low(decoder_codec (data), decode_fun, 2);    if ((TYPEOF(Pike_sp[-1]) == T_ARRAY) &&    o->prog &&    ((fun = FIND_LFUN(o->prog, LFUN_CREATE)) != -1)) {    /* Call lfun::create(@args). */    INT32 args;    Pike_sp--;    args = Pike_sp->u.array->size;
pike.git/src/encode.c:5009:   #endif       free_string (data->data_str);    if (data->codec) free_object (data->codec);    free_mapping(data->decoded);       while(data->unfinished_programs)    {    struct unfinished_prog_link *tmp=data->unfinished_programs;    data->unfinished_programs=tmp->next; -  free((char *)tmp); +  free(tmp);    }       while(data->unfinished_objects)    {    struct unfinished_obj_link *tmp=data->unfinished_objects;    data->unfinished_objects=tmp->next;    free_svalue(&tmp->decode_arg);    free_object(tmp->o); -  free((char *)tmp); +  free(tmp);    }       while(data->unfinished_placeholders)    {    struct unfinished_obj_link *tmp=data->unfinished_placeholders;    data->unfinished_placeholders=tmp->next;    free_object(tmp->o); -  free((char *)tmp); +  free(tmp);    }      #ifdef PIKE_THREADS    data->thread_state = NULL;    free_object (data->thread_obj);   #endif       free( (char *) data);   }