This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make PadnameIN_SCOPE() name begin with S_
authorKarl Williamson <khw@cpan.org>
Wed, 11 Sep 2019 21:56:11 +0000 (15:56 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 15 Sep 2019 16:39:56 +0000 (10:39 -0600)
All functions should have a prefix.

embed.fnc
embed.h
inline.h
proto.h

index 53e5e05..a8e9deb 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -3239,6 +3239,9 @@ pd        |void   |do_dump_pad    |I32 level|NN PerlIO *file|NULLOK PADLIST *padlist|int ful
 Sd     |void   |cv_dump        |NN const CV *cv|NN const char *title
 #  endif
 #endif
+#if defined(PERL_IN_PAD_C) || defined(PERL_IN_OP_C)
+iT     |bool   |PadnameIN_SCOPE|NN const PADNAME * const pn|const U32 seq
+#endif
 Apd    |CV*    |cv_clone       |NN CV* proto
 p      |CV*    |cv_clone_into  |NN CV* proto|NN CV *target
 pd     |void   |pad_fixup_inner_anons|NN PADLIST *padlist|NN CV *old_cv|NN CV *new_cv
diff --git a/embed.h b/embed.h
index 9eb9a70..2239115 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define pad_findlex(a,b,c,d,e,f,g,h,i) S_pad_findlex(aTHX_ a,b,c,d,e,f,g,h,i)
 #define pad_reset()            S_pad_reset(aTHX)
 #  endif
+#  if defined(PERL_IN_PAD_C) || defined(PERL_IN_OP_C)
+#define PadnameIN_SCOPE                S_PadnameIN_SCOPE
+#  endif
 #  if defined(PERL_IN_PERL_C)
 #define find_beginning(a,b)    S_find_beginning(aTHX_ a,b)
 #define forbid_setid(a,b)      S_forbid_setid(aTHX_ a,b)
index 951818a..501a264 100644 (file)
--- a/inline.h
+++ b/inline.h
@@ -119,8 +119,10 @@ S_MgBYTEPOS(pTHX_ MAGIC *mg, SV *sv, const char *s, STRLEN len)
 
 #if defined(PERL_IN_PAD_C) || defined(PERL_IN_OP_C)
 PERL_STATIC_INLINE bool
-PadnameIN_SCOPE(const PADNAME * const pn, const U32 seq)
+S_PadnameIN_SCOPE(const PADNAME * const pn, const U32 seq)
 {
+    PERL_ARGS_ASSERT_PADNAMEIN_SCOPE;
+
     /* is seq within the range _LOW to _HIGH ?
      * This is complicated by the fact that PL_cop_seqmax
      * may have wrapped around at some point */
diff --git a/proto.h b/proto.h
index 6a5eb57..f7e1028 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -5708,6 +5708,13 @@ STATIC PADOFFSET S_pad_findlex(pTHX_ const char *namepv, STRLEN namelen, U32 fla
 STATIC void    S_pad_reset(pTHX);
 #define PERL_ARGS_ASSERT_PAD_RESET
 #endif
+#if defined(PERL_IN_PAD_C) || defined(PERL_IN_OP_C)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE bool        S_PadnameIN_SCOPE(const PADNAME * const pn, const U32 seq);
+#define PERL_ARGS_ASSERT_PADNAMEIN_SCOPE       \
+       assert(pn)
+#endif
+#endif
 #if defined(PERL_IN_PERLY_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_TOKE_C)
 #ifndef NO_MATHOMS
 PERL_CALLCONV OP*      Perl_ref(pTHX_ OP* o, I32 type);