pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c:1881:    }   #endif    args -= 3;    /* Note: val should always be a zero here! */    lvalue_type = lvalue_to_svalue_no_free(val, lval);       if ((TYPEOF(*val) == T_MAPPING) && (lvalue_type != PIKE_T_GET_SET)) {    struct mapping *m = val->u.mapping;    if( m->refs == 2 )    { +  if ((TYPEOF(*lval) == T_OBJECT) && +  lval->u.object->prog && +  ((FIND_LFUN(lval->u.object->prog, LFUN_ASSIGN_INDEX) >= 0) || +  (FIND_LFUN(lval->u.object->prog, LFUN_ASSIGN_ARROW) >= 0))) { +  /* There's a function controlling assignments in this object, +  * so we can't alter the mapping in place. +  */ +  } else {    int i;    /* fprintf( stderr, "map_refs==2\n" ); */    for( i=0; i<args; i+=2 )    low_mapping_insert( m, Pike_sp-(i+2), Pike_sp-(i+1), 2 );    stack_pop_n_elems_keep_top(2+args);    return;    }    } -  +  }       f_aggregate_mapping(args);    f_add(2);    assign_lvalue(lval, val);    stack_pop_2_elems_keep_top();   }      /* NOTE: May perform destructive operations on either of the arguments    * if it has only a single reference.    */