pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:351:    * lvalues are stored in two svalues in one of these formats:    * array[index] : { array, index }    * mapping[index] : { mapping, index }    * multiset[index] : { multiset, index }    * object[index] : { object, index } (external object indexing)    * local variable : { svalue pointer (T_SVALUE_PTR), nothing (T_VOID) }    * global variable : { object, identifier index (T_OBJ_INDEX) } (internal object indexing)    * lvalue array: { T_ARRAY_LVALUE, array with lvalue pairs }    */    - void lvalue_to_svalue_no_free(struct svalue *to,struct svalue *lval) + int lvalue_to_svalue_no_free(struct svalue *to, struct svalue *lval)   { -  +  int run_time_type;   #ifdef PIKE_SECURITY    if(TYPEOF(*lval) <= MAX_COMPLEX)    if(!CHECK_DATA_SECURITY(lval->u.array, SECURITY_BIT_INDEX))    Pike_error("Index permission denied.\n");   #endif -  switch(TYPEOF(*lval)) +  switch(run_time_type = TYPEOF(*lval))    {    case T_ARRAY_LVALUE:    {    INT32 e;    struct array *a;    TYPE_FIELD types = 0;    ONERROR err;    a=allocate_array(lval[1].u.array->size>>1);    SET_ONERROR(err, do_free_array, a);    for(e=0;e<a->size;e++) {
pike.git/src/interpret.c:414:    SET_SVAL(*to, T_INT, NUMBER_UNDEFINED, integer, 0);    }    break;       default:    if(SAFE_IS_ZERO(lval))    index_error(0,0,0,lval,lval+1,"Indexing the NULL value.\n");    else    index_error(0,0,0,lval,lval+1,"Indexing a basic type.\n");    } +  return run_time_type;   }      PMOD_EXPORT void assign_lvalue(struct svalue *lval,struct svalue *from)   {   #ifdef PIKE_SECURITY    if(TYPEOF(*lval) <= MAX_COMPLEX)    if(!CHECK_DATA_SECURITY(lval->u.array, SECURITY_BIT_SET_INDEX))    Pike_error("Assign index permission denied.\n");   #endif