This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
embed.fnc: Restrict the 'ref' function's accessibility
authorKarl Williamson <khw@cpan.org>
Sat, 31 Aug 2019 21:31:56 +0000 (15:31 -0600)
committerKarl Williamson <khw@cpan.org>
Tue, 3 Sep 2019 03:52:12 +0000 (21:52 -0600)
This could otherwise cause name collisions.  It is only used in two .c
files in the core

embed.fnc

index b54e4dc..7a6ffb7 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1448,7 +1448,9 @@ S |OP*    |pmtrans        |NN OP* o|NN OP* expr|NN OP* repl
 #endif
 Ap     |void   |pop_scope
 Ap     |void   |push_scope
+#if defined(PERL_IN_PERLY_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_TOKE_C)
 ApMb   |OP*    |ref            |NULLOK OP* o|I32 type
+#endif
 #if defined(PERL_IN_OP_C)
 S      |OP*    |refkids        |NULLOK OP* o|I32 type
 #endif