summaryrefslogtreecommitdiff
path: root/scope.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-06-26 00:18:03 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-06-26 01:12:10 -0700
commit20d5dc239d1bc8440adfec25faf617e0e444f64e (patch)
tree8ebab95b5783396ff210544b5e03d3317dfd7706 /scope.h
parentae3f739188e3ee21fa593cafc28023c533e8d9bf (diff)
downloadperl-20d5dc239d1bc8440adfec25faf617e0e444f64e.tar.gz
In-place sort should not leave array read-only
$ ./perl -Ilib -e '@a=1..2; eval { @a=sort{die} @a }; warn "ok so far\n"; @a = 1' ok so far Modification of a read-only value attempted at -e line 1. If something goes wrong inside the sort block and it dies, we still need to make sure we turn off the read-only flag on that array.
Diffstat (limited to 'scope.h')
-rw-r--r--scope.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/scope.h b/scope.h
index a9ef5426f7..235212f9e3 100644
--- a/scope.h
+++ b/scope.h
@@ -38,12 +38,12 @@
#define SAVEt_OP 18
#define SAVEt_PARSER 19
#define SAVEt_STACK_POS 20
+#define SAVEt_READONLY_OFF 21
-#define SAVEt_ARG1_MAX 20
+#define SAVEt_ARG1_MAX 21
/* two args */
-#define SAVEt_ADELETE 21
#define SAVEt_APTR 22
#define SAVEt_AV 23
#define SAVEt_DESTRUCTOR 24
@@ -68,17 +68,18 @@
#define SAVEt_SV 43
#define SAVEt_SVREF 44
#define SAVEt_VPTR 45
+#define SAVEt_ADELETE 46
-#define SAVEt_ARG2_MAX 45
+#define SAVEt_ARG2_MAX 46
/* three args */
-#define SAVEt_AELEM 46
#define SAVEt_DELETE 47
#define SAVEt_HELEM 48
#define SAVEt_PADSV_AND_MORTALIZE 49
#define SAVEt_SET_SVFLAGS 50
#define SAVEt_GVSLOT 51
+#define SAVEt_AELEM 52
#define SAVEf_SETMAGIC 1
#define SAVEf_KEEPOLDELEM 2