This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
use cBOOL() in pp_subst()
authorDavid Mitchell <davem@iabyn.com>
Wed, 2 Mar 2016 10:23:43 +0000 (10:23 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 2 Mar 2016 10:23:43 +0000 (10:23 +0000)
Now that we have that macro, use it.

pp_hot.c

index 5a6f95c..23e5d87 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2911,9 +2911,7 @@ PP(pp_subst)
 
     SvGETMAGIC(TARG); /* must come before cow check */
 #ifdef PERL_ANY_COW
-    /* Awooga. Awooga. "bool" types that are actually char are dangerous,
-       because they make integers such as 256 "false".  */
-    is_cow = SvIsCOW(TARG) ? TRUE : FALSE;
+    is_cow = cBOOL(SvIsCOW(TARG));
 #endif
     if (!(rpm->op_pmflags & PMf_NONDESTRUCT)) {
 #ifndef PERL_ANY_COW