summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-10-12 16:26:56 +0200
committerAaron Crane <arc@cpan.org>2017-10-21 16:51:54 +0100
commit8162b70e63fb41df1eaf259c13d61d8b563cd7f5 (patch)
tree11c01a18a4ea042a9857efa20f0b0b120fb9c310
parent516e10a9956d11346cdddceee7203ef7e6181dc0 (diff)
downloadperl-8162b70e63fb41df1eaf259c13d61d8b563cd7f5.tar.gz
Don't use VOL internally, because "volatile" works just fine
However, we do preserve it outside PERL_CORE for the use of XS authors.
-rw-r--r--embed.fnc2
-rw-r--r--ext/re/re.pm2
-rw-r--r--ext/re/re.xs2
-rw-r--r--intrpvar.h2
-rw-r--r--op.c6
-rw-r--r--perl.c12
-rw-r--r--perl.h2
-rw-r--r--proto.h2
-rw-r--r--regcomp.c4
-rw-r--r--regcomp.h2
10 files changed, 19 insertions, 17 deletions
diff --git a/embed.fnc b/embed.fnc
index b87c5dd80b..05c5d883a9 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1237,7 +1237,7 @@ Ap |void |call_atexit |ATEXIT_t fn|NULLOK void *ptr
ApdO |I32 |call_argv |NN const char* sub_name|I32 flags|NN char** argv
ApdO |I32 |call_method |NN const char* methname|I32 flags
ApdO |I32 |call_pv |NN const char* sub_name|I32 flags
-ApdO |I32 |call_sv |NN SV* sv|VOL I32 flags
+ApdO |I32 |call_sv |NN SV* sv|volatile I32 flags
Ap |void |despatch_signals
Ap |OP * |doref |NN OP *o|I32 type|bool set_op_ref
ApdO |SV* |eval_pv |NN const char* p|I32 croak_on_error
diff --git a/ext/re/re.pm b/ext/re/re.pm
index 81c632b6df..0b52e1d7d7 100644
--- a/ext/re/re.pm
+++ b/ext/re/re.pm
@@ -4,7 +4,7 @@ package re;
use strict;
use warnings;
-our $VERSION = "0.35";
+our $VERSION = "0.36";
our @ISA = qw(Exporter);
our @EXPORT_OK = ('regmust',
qw(is_regexp regexp_pattern
diff --git a/ext/re/re.xs b/ext/re/re.xs
index c2064ffb91..497135a5da 100644
--- a/ext/re/re.xs
+++ b/ext/re/re.xs
@@ -18,7 +18,7 @@ START_EXTERN_C
extern REGEXP* my_re_compile (pTHX_ SV * const pattern, const U32 pm_flags);
extern REGEXP* my_re_op_compile (pTHX_ SV ** const patternp, int pat_count,
- OP *expr, const regexp_engine* eng, REGEXP *VOL old_re,
+ OP *expr, const regexp_engine* eng, REGEXP *volatile old_re,
bool *is_bare_re, U32 rx_flags, U32 pm_flags);
extern I32 my_regexec (pTHX_ REGEXP * const prog, char* stringarg, char* strend,
diff --git a/intrpvar.h b/intrpvar.h
index 766e552aed..6bfbc4d831 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -557,7 +557,7 @@ PERLVAR(I, sighandlerp, Sighandler_t)
PERLVARA(I, body_roots, PERL_ARENA_ROOTS_SIZE, void*) /* array of body roots */
-PERLVAR(I, debug, VOL U32) /* flags given to -D switch */
+PERLVAR(I, debug, volatile U32) /* flags given to -D switch */
PERLVARI(I, padlist_generation, U32, 1) /* id to identify padlist clones */
diff --git a/op.c b/op.c
index 95b7971a9c..14764ad349 100644
--- a/op.c
+++ b/op.c
@@ -4448,11 +4448,11 @@ static OP *
S_fold_constants(pTHX_ OP *const o)
{
dVAR;
- OP * VOL curop;
+ OP * volatile curop;
OP *newop;
- VOL I32 type = o->op_type;
+ volatile I32 type = o->op_type;
bool is_stringify;
- SV * VOL sv = NULL;
+ SV * volatile sv = NULL;
int ret = 0;
OP *old_next;
SV * const oldwarnhook = PL_warnhook;
diff --git a/perl.c b/perl.c
index 2eb697c239..2540cb360e 100644
--- a/perl.c
+++ b/perl.c
@@ -611,7 +611,7 @@ int
perl_destruct(pTHXx)
{
dVAR;
- VOL signed char destruct_level; /* see possible values in intrpvar.h */
+ volatile signed char destruct_level; /* see possible values in intrpvar.h */
HV *hv;
#ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP
pid_t child;
@@ -2838,14 +2838,14 @@ See L<perlcall>.
*/
I32
-Perl_call_sv(pTHX_ SV *sv, VOL I32 flags)
+Perl_call_sv(pTHX_ SV *sv, volatile I32 flags)
/* See G_* flags in cop.h */
{
dVAR;
LOGOP myop; /* fake syntax tree node */
METHOP method_op;
I32 oldmark;
- VOL I32 retval = 0;
+ volatile I32 retval = 0;
bool oldcatch = CATCH_GET;
int ret;
OP* const oldop = PL_op;
@@ -2993,8 +2993,8 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags)
{
dVAR;
UNOP myop; /* fake syntax tree node */
- VOL I32 oldmark;
- VOL I32 retval = 0;
+ volatile I32 oldmark;
+ volatile I32 retval = 0;
int ret;
OP* const oldop = PL_op;
dJMPENV;
@@ -5051,7 +5051,7 @@ void
Perl_call_list(pTHX_ I32 oldscope, AV *paramList)
{
SV *atsv;
- VOL const line_t oldline = PL_curcop ? CopLINE(PL_curcop) : 0;
+ volatile const line_t oldline = PL_curcop ? CopLINE(PL_curcop) : 0;
CV *cv;
STRLEN len;
int ret;
diff --git a/perl.h b/perl.h
index 1623057d20..2d92c63947 100644
--- a/perl.h
+++ b/perl.h
@@ -571,7 +571,9 @@
#endif
/* This exists only for back-compat. */
+#ifndef PERL_CORE
#define VOL volatile
+#endif
/* By compiling a perl with -DNO_TAINT_SUPPORT or -DSILENT_NO_TAINT_SUPPORT,
* you get a perl without taint support, but doubtlessly with a lesser
diff --git a/proto.h b/proto.h
index 4e5021ccd0..b0a54da7b9 100644
--- a/proto.h
+++ b/proto.h
@@ -278,7 +278,7 @@ PERL_CALLCONV I32 Perl_call_method(pTHX_ const char* methname, I32 flags);
PERL_CALLCONV I32 Perl_call_pv(pTHX_ const char* sub_name, I32 flags);
#define PERL_ARGS_ASSERT_CALL_PV \
assert(sub_name)
-PERL_CALLCONV I32 Perl_call_sv(pTHX_ SV* sv, VOL I32 flags);
+PERL_CALLCONV I32 Perl_call_sv(pTHX_ SV* sv, volatile I32 flags);
#define PERL_ARGS_ASSERT_CALL_SV \
assert(sv)
PERL_CALLCONV const PERL_CONTEXT * Perl_caller_cx(pTHX_ I32 level, const PERL_CONTEXT **dbcxp);
diff --git a/regcomp.c b/regcomp.c
index cc0ff96064..18e87e156c 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -14874,9 +14874,9 @@ S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV** return_invlist,
'stack' of where the undealt-with left
parens would be if they were actually
put there */
- /* The 'VOL' (expanding to 'volatile') is a workaround for an optimiser bug
+ /* The 'volatile' is a workaround for an optimiser bug
* in Solaris Studio 12.3. See RT #127455 */
- VOL IV fence = 0; /* Position of where most recent undealt-
+ volatile IV fence = 0; /* Position of where most recent undealt-
with left paren in stack is; -1 if none.
*/
STRLEN len; /* Temporary */
diff --git a/regcomp.h b/regcomp.h
index 14599fac00..bb746b7334 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -1063,7 +1063,7 @@ re.pm, especially to the documentation.
#ifdef DEBUGGING
-#define GET_RE_DEBUG_FLAGS_DECL VOL IV re_debug_flags = 0; \
+#define GET_RE_DEBUG_FLAGS_DECL volatile IV re_debug_flags = 0; \
PERL_UNUSED_VAR(re_debug_flags); GET_RE_DEBUG_FLAGS;
#define RE_PV_COLOR_DECL(rpv,rlen,isuni,dsv,pv,l,m,c1,c2) \