pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:264:   //!   //! @returns   //! The value that was removed will be returned.   //!   //! @note   //! Note that @[m_delete()] changes @[map] destructively.   //!   //! @seealso   //! @[mappingp()]   //! - PIKEFUN 1 m_delete(mapping(mixed:1=mixed) map, mixed index) + PIKEFUN mixed m_delete(object|mapping map, mixed index)    efun;    optflags OPT_SIDE_EFFECT;   { -  +  /*FIXME: Should be +  * type function(mapping(1=mixed:2=mixed),1:2)| +  * function(object,mixed:mixed); +  * +  * or similar +  */ +  if( map->type == T_MAPPING ) +  {    struct svalue s; -  map_delete_no_free(map, index, &s); +  map_delete_no_free(map->u.mapping, index, &s);    pop_n_elems(args);    *sp=s;    sp++;    } -  +  else +  { +  apply_lfun( map->u.object, LFUN__M_DELETE, 1 ); +  stack_swap(); +  pop_stack(); +  } + }      //! Returns 1 if the weak flag has been set for @[m].   //!   PIKEFUN int(0 .. 1) get_weak_flag(array|mapping|multiset m)    efun;    optflags OPT_EXTERNAL_DEPEND;   {    int flag = 0;    switch (m->type) {    case T_ARRAY: