summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-02-09 21:30:13 -0700
committerKarl Williamson <public@khwilliamson.com>2011-02-14 08:41:38 -0700
commiteda9cac17f1c742273b62b039f512bc88ffb37a1 (patch)
tree0daf4270ea9e6d2d16692b4d0ed825c79d427dda
parent781aab5ce76879fa60024011ffb8e9327d6d0a96 (diff)
downloadperl-eda9cac17f1c742273b62b039f512bc88ffb37a1.tar.gz
foldEQ_utf8: Add version with flags parameter
The parameter doesn't do anything yet. The old version becomes a macro calling the new version with 0 as the flags.
-rw-r--r--embed.fnc5
-rw-r--r--embed.h2
-rw-r--r--global.sym2
-rw-r--r--proto.h8
-rw-r--r--utf8.c4
-rw-r--r--utf8.h2
6 files changed, 16 insertions, 7 deletions
diff --git a/embed.fnc b/embed.fnc
index cd7e187012..1174f4fa5e 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -517,9 +517,12 @@ AnpP |I32 |foldEQ_locale |NN const char* a|NN const char* b|I32 len
Am |I32 |ibcmp_utf8 |NN const char *s1|NULLOK char **pe1|UV l1 \
|bool u1|NN const char *s2|NULLOK char **pe2 \
|UV l2|bool u2
-Apd |I32 |foldEQ_utf8 |NN const char *s1|NULLOK char **pe1|UV l1 \
+Amd |I32 |foldEQ_utf8 |NN const char *s1|NULLOK char **pe1|UV l1 \
|bool u1|NN const char *s2|NULLOK char **pe2 \
|UV l2|bool u2
+AMp |I32 |foldEQ_utf8_flags |NN const char *s1|NULLOK char **pe1|UV l1 \
+ |bool u1|NN const char *s2|NULLOK char **pe2 \
+ |UV l2|bool u2|U32 flags
AnpP |I32 |foldEQ_latin1 |NN const char* a|NN const char* b|I32 len
#if defined(PERL_IN_DOIO_C)
sR |bool |ingroup |Gid_t testgid|bool effective
diff --git a/embed.h b/embed.h
index bfd03d4ecd..297e55b07f 100644
--- a/embed.h
+++ b/embed.h
@@ -134,7 +134,7 @@
#define foldEQ Perl_foldEQ
#define foldEQ_latin1 Perl_foldEQ_latin1
#define foldEQ_locale Perl_foldEQ_locale
-#define foldEQ_utf8(a,b,c,d,e,f,g,h) Perl_foldEQ_utf8(aTHX_ a,b,c,d,e,f,g,h)
+#define foldEQ_utf8_flags(a,b,c,d,e,f,g,h,i) Perl_foldEQ_utf8_flags(aTHX_ a,b,c,d,e,f,g,h,i)
#ifndef PERL_IMPLICIT_CONTEXT
#define form Perl_form
#endif
diff --git a/global.sym b/global.sym
index 6c515103c4..276fd8108a 100644
--- a/global.sym
+++ b/global.sym
@@ -133,7 +133,7 @@ Perl_find_rundefsvoffset
Perl_foldEQ
Perl_foldEQ_latin1
Perl_foldEQ_locale
-Perl_foldEQ_utf8
+Perl_foldEQ_utf8_flags
Perl_form
Perl_free_tmps
Perl_get_av
diff --git a/proto.h b/proto.h
index 5436f590c8..960e5f5246 100644
--- a/proto.h
+++ b/proto.h
@@ -994,10 +994,14 @@ PERL_CALLCONV I32 Perl_foldEQ_locale(const char* a, const char* b, I32 len)
#define PERL_ARGS_ASSERT_FOLDEQ_LOCALE \
assert(a); assert(b)
-PERL_CALLCONV I32 Perl_foldEQ_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2)
+/* PERL_CALLCONV I32 foldEQ_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_5); */
+
+PERL_CALLCONV I32 Perl_foldEQ_utf8_flags(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2, U32 flags)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_5);
-#define PERL_ARGS_ASSERT_FOLDEQ_UTF8 \
+#define PERL_ARGS_ASSERT_FOLDEQ_UTF8_FLAGS \
assert(s1); assert(s2)
PERL_CALLCONV char* Perl_form(pTHX_ const char* pat, ...)
diff --git a/utf8.c b/utf8.c
index f6cdba28e0..4399fcabbc 100644
--- a/utf8.c
+++ b/utf8.c
@@ -3034,7 +3034,7 @@ http://www.unicode.org/unicode/reports/tr21/ (Case Mappings).
=cut */
I32
-Perl_foldEQ_utf8(pTHX_ const char *s1, char **pe1, register UV l1, bool u1, const char *s2, char **pe2, register UV l2, bool u2)
+Perl_foldEQ_utf8_flags(pTHX_ const char *s1, char **pe1, register UV l1, bool u1, const char *s2, char **pe2, register UV l2, bool u2, U32 flags)
{
dVAR;
register const U8 *p1 = (const U8*)s1; /* Point to current char */
@@ -3051,7 +3051,7 @@ Perl_foldEQ_utf8(pTHX_ const char *s1, char **pe1, register UV l1, bool u1, cons
U8 natbuf[2]; /* Holds native 8-bit char converted to utf8;
these always fit in 2 bytes */
- PERL_ARGS_ASSERT_FOLDEQ_UTF8;
+ PERL_ARGS_ASSERT_FOLDEQ_UTF8_FLAGS;
if (pe1) {
e1 = *(U8**)pe1;
diff --git a/utf8.h b/utf8.h
index 88589a09df..2386eb6148 100644
--- a/utf8.h
+++ b/utf8.h
@@ -20,6 +20,8 @@
#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)
+#define foldEQ_utf8(s1, pe1, l1, u1, s2, pe2, l2, u2) \
+ foldEQ_utf8_flags(s1, pe1, l1, u1, s2, pe2, l2, u2, 0)
/*
=for apidoc ibcmp_utf8