diff options
author | Karl Williamson <khw@khw-desktop.(none)> | 2010-06-05 11:12:47 -0600 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2010-06-05 23:23:59 +0200 |
commit | e6226b18246ce7d24213c41123114ac7967ed04f (patch) | |
tree | bbeecac1f9d6394373c38a61828fff2fa868ebc5 /utf8.h | |
parent | d51c1b21fa08933083b4723794b68ac09a7a248b (diff) | |
download | perl-e6226b18246ce7d24213c41123114ac7967ed04f.tar.gz |
Change name of ibcmp to foldEQ
As discussed on p5p, ibcmp has different semantics from other cmp
functions in that it is a binary instead of ternary function. It is
less confusing then to have a name that implies true/false.
There are three functions affected: ibcmp, ibcmp_locale and ibcmp_utf8.
ibcmp is actually equivalent to foldNE, but for the same reason that things
like 'unless' and 'until' are cautioned against, I changed the functions
to foldEQ, so that the existing names, like ibcmp_utf8 are defined as
macros as being the complement of foldEQ.
This patch also changes the one file where turning ibcmp into a macro
causes problems. It changes it to use the new name. It also documents
for the first time ibcmp, ibcmp_locale and their new names.
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -20,6 +20,16 @@ #define uvuni_to_utf8(d, uv) uvuni_to_utf8_flags(d, uv, 0) #define is_utf8_string_loc(s, len, ep) is_utf8_string_loclen(s, len, ep, 0) +/* +=for apidoc ibcmp_utf8 + +This is a synonym for (! foldEQ_utf8()) + +=cut +*/ +#define ibcmp_utf8(s1, pe1, l1, u1, s2, pe2, l2, u2) \ + cBOOL(! foldEQ_utf8(s1, pe1, l1, u1, s2, pe2, l2, u2)) + #ifdef EBCDIC /* The equivalent of these macros but implementing UTF-EBCDIC are in the following header file: |