pike.git / src / opcodes.c

version» Context lines:

pike.git/src/opcodes.c:19:   #include "pike_types.h"   #include "pike_memory.h"   #include "fd_control.h"   #include "cyclic.h"   #include "builtin_functions.h"   #include "module_support.h"   #include "security.h"   #include "bignum.h"   #include "operators.h"    - RCSID("$Id: opcodes.c,v 1.70 1999/12/22 00:35:33 grubba Exp $"); + RCSID("$Id: opcodes.c,v 1.71 2000/01/27 23:14:46 hubbe Exp $");      void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)   {    INT32 i;      #ifdef PIKE_SECURITY    if(what->type <= MAX_COMPLEX)    if(!CHECK_DATA_SECURITY(what->u.array, SECURITY_BIT_INDEX))    error("Index permission denied.\n");   #endif
pike.git/src/opcodes.c:146:    }else       switch(run_time_type)    {    default:    error("Cannot perform cast to that type.\n");       case T_MIXED:    return;    +  case T_MULTISET: +  switch(sp[-1].type) +  { +  case T_ARRAY: +  f_mkmultiset(1); +  break; +  +  default: +  error("Cannot cast %s to multiset.\n",get_name_of_type(sp[-1].type)); +  } +  break; +     case T_MAPPING:    switch(sp[-1].type)    {    case T_ARRAY:    {    f_transpose(1);    sp--;    dmalloc_touch_svalue(sp);    push_array_items(sp->u.array);    f_mkmapping(2);
pike.git/src/opcodes.c:556:       if((m=(struct mapping *)BEGIN_CYCLIC(tmp,0)))    {    ref_push_mapping(m);    }else{    INT32 e,i;    struct keypair *k;   #ifdef PIKE_DEBUG    struct svalue *save_sp=sp+1;   #endif -  push_mapping(m=allocate_mapping(tmp->size)); +  push_mapping(m=allocate_mapping(m_sizeof(tmp)));       SET_CYCLIC_RET(m);       MAPPING_LOOP(tmp)    {    push_svalue(& k->ind);    o_cast(itype, run_time_itype);    push_svalue(& k->val);    o_cast(vtype, run_time_vtype);    mapping_insert(m,sp-2,sp-1);