pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:284:    if( map->type == T_MAPPING )    {    struct svalue s;    map_delete_no_free(map->u.mapping, index, &s);    pop_n_elems(args);    *sp=s;    sp++;    }    else if (map->type == T_OBJECT)    { -  apply_lfun( map->u.object, LFUN__M_DELETE, args-1 ); +  int id; +  if( !map->u.object->prog || !(map->u.object->prog->flags & PROGRAM_FIXED) ) +  SIMPLE_BAD_ARG_ERROR("m_delete", 1, "object|mapping"); +  +  id = map->u.object->prog->lfuns[ LFUN__M_DELETE ]; +  +  if( id == -1 ) +  SIMPLE_BAD_ARG_ERROR("m_delete", 1, "object with _m_delete"); +  +  apply_low( map->u.object, id, 1 );    stack_swap();    pop_stack();    } else {    SIMPLE_BAD_ARG_ERROR("m_delete", 1, "object|mapping");    }   }      //! Returns 1 if the weak flag has been set for @[m].   //!   PIKEFUN int(0 .. 1) get_weak_flag(array|mapping|multiset m)