This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Subject: regcomp.h: Add macro to get regnode flags
authorKarl Williamson <public@khwilliamson.com>
Thu, 23 Sep 2010 13:53:10 +0000 (07:53 -0600)
committerJesse Vincent <jesse@bestpractical.com>
Fri, 15 Oct 2010 14:14:29 +0000 (23:14 +0900)
regcomp.h

index 362a8ed..1fb0e51 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -271,6 +271,8 @@ struct regnode_charclass_class {    /* has [[:blah:]] classes */
 #undef STRING
 
 #define        OP(p)           ((p)->type)
+#define FLAGS(p)       ((p)->flags)    /* Caution: Doesn't apply to all
+                                          regnode types */
 #define        OPERAND(p)      (((struct regnode_string *)p)->string)
 #define MASK(p)                ((char*)OPERAND(p))
 #define        STR_LEN(p)      (((struct regnode_string *)p)->str_len)