This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Can use memEQ instead of strnEQ in CHECK_WORD()
authorNicholas Clark <nick@ccl4.org>
Thu, 22 Mar 2007 22:21:54 +0000 (22:21 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 22 Mar 2007 22:21:54 +0000 (22:21 +0000)
p4raw-id: //depot/perl@30700

regcomp.c

index 663d288..9733476 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -4956,7 +4956,7 @@ S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags) {
 
 /* this idea is borrowed from STR_WITH_LEN in handy.h */
 #define CHECK_WORD(s,v,l)  \
 
 /* this idea is borrowed from STR_WITH_LEN in handy.h */
 #define CHECK_WORD(s,v,l)  \
-    (((sizeof(s)-1)==(l)) && (strnEQ(start_verb, (s ""), (sizeof(s)-1))))
+    (((sizeof(s)-1)==(l)) && (memEQ(start_verb, (s ""), (sizeof(s)-1))))
 
 STATIC regnode *
 S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
 
 STATIC regnode *
 S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)