summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-11-02 21:12:08 -0600
committerKarl Williamson <khw@cpan.org>2017-11-06 12:50:06 -0700
commitfdbb9a7c835f49cd77be3c95ba91896c1d4a431b (patch)
tree0b3c94da209f587a446f33b98b84626ab2697ca3 /handy.h
parent6089516632ada70975daada3ec4c28abaff68703 (diff)
downloadperl-fdbb9a7c835f49cd77be3c95ba91896c1d4a431b.tar.gz
Make new macros private
Until we decide these weren't a bad idea
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/handy.h b/handy.h
index c3f5bbed7f..cf222e87ce 100644
--- a/handy.h
+++ b/handy.h
@@ -476,8 +476,6 @@ Returns zero if non-equal, or non-zero if equal.
#define strnNE(s1,s2,l) (strncmp(s1,s2,l) != 0)
#define strnEQ(s1,s2,l) (strncmp(s1,s2,l) == 0)
-#define strBEGINs(s1,s2) (strncmp(s1,"" s2 "", sizeof(s2)-1) == 0)
-
#define memNE(s1,s2,l) (memcmp(s1,s2,l) != 0)
#define memEQ(s1,s2,l) (memcmp(s1,s2,l) == 0)
@@ -486,6 +484,11 @@ Returns zero if non-equal, or non-zero if equal.
(((sizeof(s2)-1) == (l)) && memEQ((s1), ("" s2 ""), (sizeof(s2)-1)))
#define memNEs(s1, l, s2) (! memEQs(s1, l, s2))
+/* Keep these private until we decide it was a good idea */
+#if defined(PERL_CORE) || defined(PERL_EXT) || defined(PERL_EXT_POSIX)
+
+#define strBEGINs(s1,s2) (strncmp(s1,"" s2 "", sizeof(s2)-1) == 0)
+
#define memBEGINs(s1, l, s2) \
( (l) >= sizeof(s2) - 1 \
&& memEQ(s1, "" s2 "", sizeof(s2)-1))
@@ -498,6 +501,7 @@ Returns zero if non-equal, or non-zero if equal.
#define memENDPs(s1, l, s2) \
( (l) > sizeof(s2) \
&& memEQ(s1 + (l) - (sizeof(s2) - 1), "" s2 "", sizeof(s2)-1))
+#endif /* End of making macros private */
#define memLT(s1,s2,l) (memcmp(s1,s2,l) < 0)
#define memLE(s1,s2,l) (memcmp(s1,s2,l) <= 0)