regexec.c: Add clarifying comment
authorKarl Williamson <public@khwilliamson.com>
Sun, 31 Oct 2010 17:20:43 +0000 (11:20 -0600)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 31 Oct 2010 22:58:41 +0000 (15:58 -0700)
regexec.c

index 2ef017a..9acadbb 100644 (file)
--- a/regexec.c
+++ b/regexec.c
 #define        STATIC  static
 #endif
 
-#define REGINCLASS(prog,p,c)  (ANYOF_FLAGS(p) ? reginclass(prog,p,c,0,0) : ANYOF_BITMAP_TEST(p,*(c)))
+/* Valid for non-utf8 strings only: avoids the reginclass call if there are no
+ * complications: i.e., if everything matchable is straight forward in the
+ * bitmap */
+#define REGINCLASS(prog,p,c)  (ANYOF_FLAGS(p) ? reginclass(prog,p,c,0,0)   \
+                                             : ANYOF_BITMAP_TEST(p,*(c)))
 
 /*
  * Forwards.