This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #121983] #error with ro ops and no threads
authorFather Chrysostomos <sprout@cpan.org>
Sat, 20 Sep 2014 07:43:28 +0000 (00:43 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 20 Sep 2014 14:43:24 +0000 (07:43 -0700)
commit40653c20251c480725942b064751eecc8af62eb6
tree4137ea1fbd49c50be281e5ad7b7e78a8c00cf168
parent5988f3061bb4e71b2048c7b82f098bfa943a07d7
[perl #121983] #error with ro ops and no threads

PERL_DEBUG_READONLY_OPS is designed to catch modifications of op trees
at run time, to make sure that perl is doing things safely under
threads.  (Op trees are shared between threads.)

On non-threaded perls, ops are modified regularly, which is perfectly
safe, so PERL_DEBUG_READONLY_OPS does not make any sense, and is guar-
anteed to crash.

Forcing a compilation error with cpp directives makes it obvious that
it is not intended for this PERL_DEBUG_READONLY_OPS mode to work with-
out USE_ITHREADS.
perl.h