diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-03-23 16:55:13 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-03-23 16:55:13 +0000 |
commit | 568a785aea241a073c29598a27f44ca0be3e7591 (patch) | |
tree | 4a2835faf4cdc6e16017c06b97c3cc2180b94bce /handy.h | |
parent | b0ca24ee9834c59905841bc9a868f799da15f1bc (diff) | |
download | perl-568a785aea241a073c29598a27f44ca0be3e7591.tar.gz |
Move CHECK_WORD in regcomp.c to a more generic memEQs() in handy.h
and provide memNEs() too.
p4raw-id: //depot/perl@30726
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -350,6 +350,10 @@ C<strncmp>). # define memEQ(s1,s2,l) (!bcmp(s1,s2,l)) #endif +#define memEQs(s1, l, s2) \ + (sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1))) +#define memNEs(s1, l, s2) !memEQs(s1, l, s2) + /* * Character classes. * |