pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:1:
/* -*- c -*- || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: builtin.cmod,v 1.
116
2003/02/
10
18
:
57
:
21
grendel Exp $
+
|| $Id: builtin.cmod,v 1.
117
2003/02/
11
00
:
38
:
34
grendel Exp $
*/ #include "global.h" #include "interpret.h" #include "svalue.h" #include "opcodes.h" #include "pike_macros.h" #include "object.h" #include "program.h" #include "array.h"
pike.git/src/builtin.cmod:737:
errname String.width; optflags OPT_TRY_OPTIMIZE; { RETURN 8 * (1 << s->size_shift); } /*! @decl mixed m_delete(object|mapping map, mixed index) *! *! If @[map] is an object that implements @[lfun::_m_delete()], *! that function will be called with @[index] as its single argument.
+
*! If @[map] is an object that does not contain the @[lfun::_m_delete()]
+
*! implementation, an errorw will be thrown.
*! *! Otherwise if @[map] is a mapping the entry with index @[index] *! will be removed from @[map] destructively. *! *! If the mapping does not have an entry with index @[index], nothing is done. *! *! @returns *! The value that was removed will be returned. *! *! @note
pike.git/src/builtin.cmod:775:
map_delete_no_free(map->u.mapping, index, &s); pop_n_elems(args); *Pike_sp=s; Pike_sp++; } else if (map->type == T_OBJECT && map->u.object->prog) { int id = FIND_LFUN(map->u.object->prog, LFUN__M_DELETE); if( id == -1 )
-
SIMPLE_BAD_ARG_ERROR("m_delete", 1, "object
with
_m_delete");
+
SIMPLE_BAD_ARG_ERROR("m_delete", 1, "object
containing
the
_m_delete
method
");
apply_low( map->u.object, id, 1 ); stack_swap(); pop_stack(); } else { SIMPLE_BAD_ARG_ERROR("m_delete", 1, "object|mapping"); } } /*! @decl int get_weak_flag(array|mapping|multiset m)