summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-03-08 20:31:25 -0700
committerKarl Williamson <khw@cpan.org>2017-11-06 12:50:05 -0700
commitc8b388b0c776dab4a28db03739aff4d64daccada (patch)
tree3bf17c3a7a4b2b7f260199423ce0baf55dc9e809 /handy.h
parent98d1c64ef90693f86df84c4ce96718ed136e933c (diff)
downloadperl-c8b388b0c776dab4a28db03739aff4d64daccada.tar.gz
Rename strEQs to strBEGINs; remove strNEs
The original names are confusing. See thread beginning with http://nntp.perl.org/group/perl.perl5.porters/244335 The two macros are mapped into just that one, complementing the result for the few cases where strNEs was used.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/handy.h b/handy.h
index 2999b3c451..d4a8aaaf3b 100644
--- a/handy.h
+++ b/handy.h
@@ -476,13 +476,7 @@ Returns zero if non-equal, or non-zero if equal.
#define strnNE(s1,s2,l) (strncmp(s1,s2,l))
#define strnEQ(s1,s2,l) (!strncmp(s1,s2,l))
-/* These names are controversial, so guarding against their being used in more
- * places than they already are. strBEGs and StrStartsWith are potential
- * candidates */
-#if defined(PERL_IN_DOIO_C) || defined(PERL_IN_GV_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_LOCALE_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_TOKE_C) || defined(PERL_EXT)
-#define strNEs(s1,s2) (strncmp(s1,"" s2 "", sizeof(s2)-1))
-#define strEQs(s1,s2) (!strncmp(s1,"" s2 "", sizeof(s2)-1))
-#endif
+#define strBEGINs(s1,s2) (strncmp(s1,"" s2 "", sizeof(s2)-1) == 0)
#define memNE(s1,s2,l) (memcmp(s1,s2,l))
#define memEQ(s1,s2,l) (!memcmp(s1,s2,l))