summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-07-14 21:49:08 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-07-14 21:49:39 -0700
commiteebd3bc0dfa10c5d80023c98a5e80dc4fb6689ca (patch)
tree2585d5a81ae97c0fa2dfdb5fcd1b459533634c33
parentfe3772c388e259ff8210505dc7e865853c277e69 (diff)
downloadperl-eebd3bc0dfa10c5d80023c98a5e80dc4fb6689ca.tar.gz
Change was_lvalue_sub back to X; spell out the only use of it
OK, now I understand what’s happening. If there is a public macro (PUSHSUB) that contains a call to a pri- vate function (was_lvalue_sub), that function has to be exported, so that non-core code can call it. But if it is marked X, there is no was_lvalue_sub shorthand macro visible to non-core code, so when the PUSHSUB macro is expanded in such code, the was_lvalue_sub(...) bit becomes a call to the function literally named was_lvalue_sub, as opposed to Perl_lvalue_sub (and is compiled that way on forgiving platforms). Making it A makes that macro available to non-core code, but also implies that it is available for direct use by extensions, which is not the case with was_lvalue_sub. So, this commit makes it X again, but spells it out in PUSHSUB, so there is no need for the function’s macro to be available when PUSHSUB is expanded. Hence, there is no need for the was_lvalue_sub macro to exist, so this commit also removes it. See also these three commits: c73b0699db 7b70e81778 777d901444
-rw-r--r--cop.h2
-rw-r--r--embed.fnc2
-rw-r--r--embed.h1
3 files changed, 2 insertions, 3 deletions
diff --git a/cop.h b/cop.h
index d261edf13b..e6650a2400 100644
--- a/cop.h
+++ b/cop.h
@@ -640,7 +640,7 @@ struct block_format {
(PL_op->op_flags & OPf_WANT) \
? OPpENTERSUB_LVAL_MASK \
: !(PL_op->op_private & OPpENTERSUB_LVAL_MASK) \
- ? 0 : was_lvalue_sub(); \
+ ? 0 : Perl_was_lvalue_sub(aTHX); \
PUSHSUB_BASE(cx) \
cx->blk_u16 = PL_op->op_private & \
(phlags|OPpENTERSUB_DEREF); \
diff --git a/embed.fnc b/embed.fnc
index e787f10ba5..0f4424a4b0 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -544,7 +544,7 @@ p |bool |io_close |NN IO* io|bool not_implicit
pR |OP* |invert |NULLOK OP* cmd
ApR |I32 |is_lvalue_sub
: Used in cop.h
-ApR |I32 |was_lvalue_sub
+XopR |I32 |was_lvalue_sub
ApPR |U32 |to_uni_upper_lc|U32 c
ApPR |U32 |to_uni_title_lc|U32 c
ApPR |U32 |to_uni_lower_lc|U32 c
diff --git a/embed.h b/embed.h
index 750c0da68d..fa1a2a9045 100644
--- a/embed.h
+++ b/embed.h
@@ -680,7 +680,6 @@
#ifndef PERL_IMPLICIT_CONTEXT
#define warner Perl_warner
#endif
-#define was_lvalue_sub() Perl_was_lvalue_sub(aTHX)
#define whichsig(a) Perl_whichsig(aTHX_ a)
#if !(defined(HAS_SIGACTION) && defined(SA_SIGINFO))
#define csighandler Perl_csighandler