pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c:1869:    else    m=merge_mapping_array_ordered(a,b,op);       return m;   }      void o_append_mapping( INT32 args )   {    struct svalue *lval = Pike_sp - args;    struct svalue *val = lval + 2; +  int lvalue_type; +    #ifdef PIKE_DEBUG    if (args < 3) {    Pike_fatal("Too few arguments to o_append_mapping(): %d\n", args);    }   #endif    args -= 3;    /* Note: val should always be a zero here! */ -  lvalue_to_svalue_no_free(val, lval); +  lvalue_type = lvalue_to_svalue_no_free(val, lval);    -  if (TYPEOF(*val) == T_MAPPING) -  { +  if ((TYPEOF(*val) == T_MAPPING) && (lvalue_type != PIKE_T_GET_SET)) {    struct mapping *m = val->u.mapping;    if( m->refs == 2 )    {    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;    }