blob: ea25eab65cff62706e0773e046a6ca34a22623a7 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001
2 **********************************************************
3 * ACHTUNG: EFUN EXISTIERT NICHT MEHR! NICHT VERWENDEN! *
4 **********************************************************
5
6SYNOPSIS:
7 mapping copy(mapping)
8
9DESCRIPTION:
10 Create a shallow copy of <arg> and return it. For arrays and mappings
11 this means that a new array or mapping is created with copies of the
12 original content. Embedded arrays and mappings are copied by reference!
13
14EXAMPLE
15 mixed *a, *b;
16
17 a = ({ 1, ({ 21, 22 }) });
18 b = copy(a);
19 a[0] = -1; a[1][0] = -21;
20 --> a is now ({ -1, ({ -21, 22 }) })
21 b is now ({ 1, ({ -21, 22 }) })
22
23WARNING
24 Keep in mind, that a copy of a mapping, that contains arrays/mappings,
25 contains references to these Mappings/Arrays, not real copies. If you
26 don't take care, you can a) change the original mappings while working
27 on the copy and b) create recursive mappings, that leak memory.
28
29HISTORY
30 Superseeded by the copy() efun.
31 Removed in LDMud 3.3 and LP "03.02.1@150".
32
33SEE ALSO:
34 mappings(LPC)
35
3626. September 2006, Zesstra