pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:2293:
SIMPLE_ARG_TYPE_ERROR("m_add", 1, "object with lfun::_m_add()"); } apply_low(l->u.object, id + p->inherits[SUBTYPEOF(*l)].identifier_level, 1); } else { SIMPLE_ARG_TYPE_ERROR("m_add", 1, "multiset|object"); } pop_n_elems(args); }
+
/*! @decl int(0..1) iterator_next(object iter)
+
*!
+
*! Advance @[iter] one step.
+
*!
+
*! @seealso
+
*! @[get_iterator()]
+
*/
+
PIKEFUN int(0..1) iterator_next(object iter)
+
efun;
+
optflags OPT_SIDE_EFFECT;
+
rawtype tFuncArg(tSetvar(0, tObj), tFindLFun(tVar(0), "_iterator_next"));
+
{
+
apply_lfun(iter, LFUN__ITERATOR_NEXT_FUN, args - 1);
+
stack_swap();
+
pop_stack();
+
}
+
+
/*! @decl mixed iterator_value(object iter)
+
*!
+
*! Get the current value for @[iter].
+
*!
+
*! @seealso
+
*! @[get_iterator()]
+
*/
+
PIKEFUN mixed iterator_value(object iter)
+
efun;
+
optflags OPT_SIDE_EFFECT;
+
rawtype tFuncArg(tSetvar(0, tObj), tFindLFun(tVar(0), "_iterator_value"));
+
{
+
apply_lfun(iter, LFUN__ITERATOR_VALUE_FUN, args - 1);
+
stack_swap();
+
pop_stack();
+
}
+
+
/*! @decl mixed iterator_index(object iter)
+
*!
+
*! Get the current index for @[iter].
+
*!
+
*! @seealso
+
*! @[get_iterator()]
+
*/
+
PIKEFUN mixed iterator_index(object iter)
+
efun;
+
optflags OPT_SIDE_EFFECT;
+
rawtype tFuncArg(tSetvar(0, tObj), tFindLFun(tVar(0), "_iterator_index"));
+
{
+
apply_lfun(iter, LFUN__ITERATOR_INDEX_FUN, args - 1);
+
stack_swap();
+
pop_stack();
+
}
+
/*! @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; {