This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.h: Remove duplicate macro expansion
authorKarl Williamson <khw@cpan.org>
Sat, 21 Sep 2019 19:14:25 +0000 (13:14 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 27 Sep 2019 17:20:35 +0000 (11:20 -0600)
This macro has the same definition as another.

regcomp.h

index 62f4398..5715e22 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -331,7 +331,8 @@ struct regnode_ssc {
 #define FLAGS(p)       ((p)->flags)    /* Caution: Doesn't apply to all      \
                                           regnode types.  For some, it's the \
                                           character set of the regnode */
-#define        OPERAND(p)      (((struct regnode_string *)p)->string)
+#define        OPERAND(p)      STRING(p)
+
 #define MASK(p)                ((char*)OPERAND(p))
 #define        STR_LEN(p)      (((struct regnode_string *)p)->str_len)
 #define        STRING(p)       (((struct regnode_string *)p)->string)