diff options
author | Nicholas Clark <nick@ccl4.org> | 2002-08-15 01:10:35 +0100 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-08-17 02:07:24 +0000 |
commit | 765f542df20317f47bb284c276cd0abfb50dcfd6 (patch) | |
tree | be92963942496ba900bdfb32c5b522ba355aafb0 /mg.c | |
parent | 6f12eb6d2a1dfaf441504d869b27d2e40ef4966a (diff) | |
download | perl-765f542df20317f47bb284c276cd0abfb50dcfd6.tar.gz |
Copy On Write
Message-id: <20020815001035.A69079@plum.flirble.org>
specify "-Accflags='-DPERL_COPY_ON_WRITE'" to use
p4raw-id: //depot/perl@17728
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -57,6 +57,11 @@ S_save_magic(pTHX_ I32 mgs_ix, SV *sv) { MGS* mgs; assert(SvMAGICAL(sv)); +#ifdef PERL_COPY_ON_WRITE + /* Turning READONLY off for a copy-on-write scalar is a bad idea. */ + if (SvIsCOW(sv)) + sv_force_normal(sv); +#endif SAVEDESTRUCTOR_X(restore_magic, INT2PTR(void*, (IV)mgs_ix)); |