diff options
author | Karl Williamson <khw@cpan.org> | 2017-11-02 21:12:08 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-11-06 12:50:06 -0700 |
commit | fdbb9a7c835f49cd77be3c95ba91896c1d4a431b (patch) | |
tree | 0b3c94da209f587a446f33b98b84626ab2697ca3 /handy.h | |
parent | 6089516632ada70975daada3ec4c28abaff68703 (diff) | |
download | perl-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.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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) |