pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1653:       apply_low(map->u.object,    id + p->inherits[SUBTYPEOF(*map)].identifier_level, 1);    stack_swap();    pop_stack();    } else {    SIMPLE_ARG_TYPE_ERROR("m_delete", 1, "object|mapping");    }   }    + /*! @decl void m_clear(mapping map) +  *! +  *! Clear the contents of a mapping. +  *! +  *! This function clears the content of the mapping @[map] so +  *! that it becomes empty. This is an atomic operation. +  *! +  *! @seealso +  *! @[m_delete()] +  */ + PMOD_EXPORT + PIKEFUN void m_clear(mapping map) +  efun +  optflags OPT_SIDE_EFFECT; + { +  /* FIXME: Add an LFUN__M_CLEAR analogous with LFUN__M_DELETE? */ +  clear_mapping(map); + } +    /*! @decl int get_weak_flag(array|mapping|multiset m)    *!    *! Returns the weak flag settings for @[m]. It's a combination of    *! @[Pike.WEAK_INDICES] and @[Pike.WEAK_VALUES].    */   PMOD_EXPORT   PIKEFUN int get_weak_flag(array m)    efun;    optflags OPT_EXTERNAL_DEPEND;   {