Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Devel::PPPort: Use prefix D_PPP_ for helper macros #16467

Closed
p5pRT opened this issue Mar 15, 2018 · 5 comments
Closed

[PATCH] Devel::PPPort: Use prefix D_PPP_ for helper macros #16467

p5pRT opened this issue Mar 15, 2018 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 15, 2018

Migrated from rt.perl.org#132984 (status was 'resolved')

Searchable as RT132984$

@p5pRT
Copy link
Author

p5pRT commented Mar 15, 2018

From @pali

Prefix D_PPP_ is already handled by ppptools.pl. This change cleanups code,
makes code more consistent and avoids specifying helper macros in =dontwarn
section.

I need to include word Perl into this email otherwise bug tracker rejects it.

@p5pRT
Copy link
Author

p5pRT commented Mar 15, 2018

From @pali

0001-Devel-PPPort-Use-prefix-D_PPP_-for-helper-macros.patch
From b737d75b77dfd5858558b1fef099561789944bde Mon Sep 17 00:00:00 2001
From: Pali <pali@cpan.org>
Date: Thu, 15 Mar 2018 20:51:30 +0100
Subject: [PATCH] Devel::PPPort: Use prefix D_PPP_ for helper macros

Prefix D_PPP_ is already handled by ppptools.pl. This change cleanups code,
makes code more consistent and avoids specifying helper macros in =dontwarn
section.
---
 dist/Devel-PPPort/parts/inc/SvPV    | 15 +++++++--------
 dist/Devel-PPPort/parts/inc/mess    |  7 +++----
 dist/Devel-PPPort/parts/inc/version |  5 ++---
 3 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/dist/Devel-PPPort/parts/inc/SvPV b/dist/Devel-PPPort/parts/inc/SvPV
index e99bfa01e0..4f0ded321c 100644
--- a/dist/Devel-PPPort/parts/inc/SvPV
+++ b/dist/Devel-PPPort/parts/inc/SvPV
@@ -21,7 +21,6 @@ sv_pvn_force_flags
 
 NEED_sv_2pv_flags
 NEED_sv_2pv_flags_GLOBAL
-DPPP_SVPV_NOLEN_LP_ARG
 
 =implementation
 
@@ -127,9 +126,9 @@ sv_pvn_force_flags(pTHX_ SV *sv, STRLEN *lp, I32 flags)
 #endif
 
 #if { VERSION < 5.8.8 } || ( { VERSION >= 5.9.0 } && { VERSION < 5.9.3 } )
-# define DPPP_SVPV_NOLEN_LP_ARG &PL_na
+# define D_PPP_SVPV_NOLEN_LP_ARG &PL_na
 #else
-# define DPPP_SVPV_NOLEN_LP_ARG 0
+# define D_PPP_SVPV_NOLEN_LP_ARG 0
 #endif
 
 __UNDEFINED__  SvPV_const(sv, lp)      SvPV_flags_const(sv, lp, SV_GMAGIC)
@@ -147,7 +146,7 @@ __UNDEFINED__  SvPV_flags_const(sv, lp, flags) \
 __UNDEFINED__  SvPV_flags_const_nolen(sv, flags) \
                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
                   ? SvPVX_const(sv) : \
-                  (const char*) sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN))
+                  (const char*) sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN))
 
 __UNDEFINED__  SvPV_flags_mutable(sv, lp, flags) \
                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
@@ -166,7 +165,7 @@ __UNDEFINED__  SvPV_force_flags(sv, lp, flags) \
 
 __UNDEFINED__  SvPV_force_flags_nolen(sv, flags) \
                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
-                 ? SvPVX(sv) : sv_pvn_force_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags))
+                 ? SvPVX(sv) : sv_pvn_force_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, flags))
 
 __UNDEFINED__  SvPV_force_flags_mutable(sv, lp, flags) \
                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
@@ -175,17 +174,17 @@ __UNDEFINED__  SvPV_force_flags_mutable(sv, lp, flags) \
 
 __UNDEFINED__  SvPV_nolen(sv) \
                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
-                  ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC))
+                  ? SvPVX(sv) : sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC))
 
 __UNDEFINED__  SvPV_nolen_const(sv) \
                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
-                  ? SvPVX_const(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN))
+                  ? SvPVX_const(sv) : sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN))
 
 __UNDEFINED__  SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0)
 __UNDEFINED__  SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0)
 __UNDEFINED__  SvPV_nomg_const_nolen(sv) SvPV_flags_const_nolen(sv, 0)
 __UNDEFINED__  SvPV_nomg_nolen(sv) ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
-                                    ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, 0))
+                                    ? SvPVX(sv) : sv_2pv_flags(sv, D_PPP_SVPV_NOLEN_LP_ARG, 0))
 
 __UNDEFINED__  SvPV_renew(sv,n) STMT_START { SvLEN_set(sv, n); \
                  SvPV_set((sv), (char *) saferealloc(          \
diff --git a/dist/Devel-PPPort/parts/inc/mess b/dist/Devel-PPPort/parts/inc/mess
index eb2de7b15e..59a6d682f0 100644
--- a/dist/Devel-PPPort/parts/inc/mess
+++ b/dist/Devel-PPPort/parts/inc/mess
@@ -35,7 +35,6 @@ PERL_ARGS_ASSERT_CROAK_XS_USAGE
 NEED_mess
 NEED_mess_nocontext
 NEED_vmess
-_dppp_fix_utf8_errsv
 
 =implementation
 
@@ -51,14 +50,14 @@ _dppp_fix_utf8_errsv
 #ifndef croak_sv
 #if { VERSION >= 5.7.3 } || ( { VERSION >= 5.6.1 } && { VERSION < 5.7.0 } )
 #  if ( { VERSION >= 5.8.0 } && { VERSION < 5.8.9 } ) || ( { VERSION >= 5.9.0 } && { VERSION < 5.10.1 } )
-#    define _dppp_fix_utf8_errsv(errsv, sv)                     \
+#    define D_PPP_FIX_UTF8_ERRSV(errsv, sv)                     \
         STMT_START {                                            \
             if (sv != ERRSV)                                    \
                 SvFLAGS(ERRSV) = (SvFLAGS(ERRSV) & ~SVf_UTF8) | \
                                  (SvFLAGS(sv) & SVf_UTF8);      \
         } STMT_END
 #  else
-#    define _dppp_fix_utf8_errsv(errsv, sv) STMT_START {} STMT_END
+#    define D_PPP_FIX_UTF8_ERRSV(errsv, sv) STMT_START {} STMT_END
 #  endif
 #  define croak_sv(sv)                        \
     STMT_START {                              \
@@ -66,7 +65,7 @@ _dppp_fix_utf8_errsv
             sv_setsv(ERRSV, sv);              \
             croak(NULL);                      \
         } else {                              \
-            _dppp_fix_utf8_errsv(ERRSV, sv);  \
+            D_PPP_FIX_UTF8_ERRSV(ERRSV, sv);  \
             croak("%" SVf, SVfARG(sv));       \
         }                                     \
     } STMT_END
diff --git a/dist/Devel-PPPort/parts/inc/version b/dist/Devel-PPPort/parts/inc/version
index 1d5c556af4..c321b203c9 100644
--- a/dist/Devel-PPPort/parts/inc/version
+++ b/dist/Devel-PPPort/parts/inc/version
@@ -19,7 +19,6 @@ PERL_BCDVERSION
 =dontwarn
 
 PERL_PATCHLEVEL_H_IMPLICIT
-_dpppDEC2BCD
 
 =implementation
 
@@ -41,8 +40,8 @@ _dpppDEC2BCD
 #  endif
 #endif
 
-#define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10))
-#define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION))
+#define D_PPP_DEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10))
+#define PERL_BCDVERSION ((D_PPP_DEC2BCD(PERL_REVISION)<<24)|(D_PPP_DEC2BCD(PERL_VERSION)<<12)|D_PPP_DEC2BCD(PERL_SUBVERSION))
 
 /* It is very unlikely that anyone will try to use this with Perl 6
    (or greater), but who knows.
-- 
2.11.0

@p5pRT
Copy link
Author

p5pRT commented Mar 21, 2018

From @khwilliamson

thanks, pushed as cb94ff0
--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Mar 21, 2018

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Mar 21, 2018

@khwilliamson - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant