summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.fnc2
-rw-r--r--embed.h2
-rw-r--r--mathoms.c6
-rw-r--r--proto.h4
-rw-r--r--utf8.c27
-rw-r--r--utf8.h4
6 files changed, 22 insertions, 23 deletions
diff --git a/embed.fnc b/embed.fnc
index 0de7804f3f..819163fef3 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -349,7 +349,7 @@ ApPR |bool |is_uni_punct_lc|UV c
ApPR |bool |is_uni_xdigit_lc|UV c
Apd |STRLEN |is_utf8_char |NN const U8 *p
Apd |bool |is_utf8_string |NN const U8 *s|STRLEN len
-Apd |bool |is_utf8_string_loc|NN const U8 *s|STRLEN len|NULLOK const U8 **p
+Apdmb |bool |is_utf8_string_loc|NN const U8 *s|STRLEN len|NULLOK const U8 **p
Apd |bool |is_utf8_string_loclen|NN const U8 *s|STRLEN len|NULLOK const U8 **ep|NULLOK STRLEN *el
ApR |bool |is_utf8_alnum |NN const U8 *p
ApR |bool |is_utf8_alnumc |NN const U8 *p
diff --git a/embed.h b/embed.h
index 0111652a64..bd52baf2f1 100644
--- a/embed.h
+++ b/embed.h
@@ -338,7 +338,6 @@
#define is_uni_xdigit_lc Perl_is_uni_xdigit_lc
#define is_utf8_char Perl_is_utf8_char
#define is_utf8_string Perl_is_utf8_string
-#define is_utf8_string_loc Perl_is_utf8_string_loc
#define is_utf8_string_loclen Perl_is_utf8_string_loclen
#define is_utf8_alnum Perl_is_utf8_alnum
#define is_utf8_alnumc Perl_is_utf8_alnumc
@@ -2326,7 +2325,6 @@
#define is_uni_xdigit_lc(a) Perl_is_uni_xdigit_lc(aTHX_ a)
#define is_utf8_char(a) Perl_is_utf8_char(aTHX_ a)
#define is_utf8_string(a,b) Perl_is_utf8_string(aTHX_ a,b)
-#define is_utf8_string_loc(a,b,c) Perl_is_utf8_string_loc(aTHX_ a,b,c)
#define is_utf8_string_loclen(a,b,c,d) Perl_is_utf8_string_loclen(aTHX_ a,b,c,d)
#define is_utf8_alnum(a) Perl_is_utf8_alnum(aTHX_ a)
#define is_utf8_alnumc(a) Perl_is_utf8_alnumc(aTHX_ a)
diff --git a/mathoms.c b/mathoms.c
index 08b90d8302..307915ccdb 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -782,6 +782,12 @@ PP(pp_mapstart)
DIE(aTHX_ "panic: mapstart"); /* uses grepstart */
}
+bool
+Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **ep)
+{
+ return is_utf8_string_loclen(s, len, ep, 0);
+}
+
/*
* Local variables:
* c-indentation-style: bsd
diff --git a/proto.h b/proto.h
index cc0df9ffd4..c048db84f3 100644
--- a/proto.h
+++ b/proto.h
@@ -883,8 +883,8 @@ PERL_CALLCONV STRLEN Perl_is_utf8_char(pTHX_ const U8 *p)
PERL_CALLCONV bool Perl_is_utf8_string(pTHX_ const U8 *s, STRLEN len)
__attribute__nonnull__(pTHX_1);
-PERL_CALLCONV bool Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **p)
- __attribute__nonnull__(pTHX_1);
+/* PERL_CALLCONV bool Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **p)
+ __attribute__nonnull__(pTHX_1); */
PERL_CALLCONV bool Perl_is_utf8_string_loclen(pTHX_ const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
__attribute__nonnull__(pTHX_1);
diff --git a/utf8.c b/utf8.c
index d6e54ba291..be4a2e9bdd 100644
--- a/utf8.c
+++ b/utf8.c
@@ -307,6 +307,16 @@ Perl_is_utf8_string(pTHX_ const U8 *s, STRLEN len)
}
/*
+Implemented as a macro in utf8.h
+
+=for apidoc A|bool|is_utf8_string_loc|const U8 *s|STRLEN len|const U8 **ep
+
+Like is_utf8_string() but stores the location of the failure (in the
+case of "utf8ness failure") or the location s+len (in the case of
+"utf8ness success") in the C<ep>.
+
+See also is_utf8_string_loclen() and is_utf8_string().
+
=for apidoc A|bool|is_utf8_string_loclen|const U8 *s|STRLEN len|const U8 **ep|const STRLEN *el
Like is_utf8_string() but stores the location of the failure (in the
@@ -368,24 +378,7 @@ Perl_is_utf8_string_loclen(pTHX_ const U8 *s, STRLEN len, const U8 **ep, STRLEN
}
/*
-=for apidoc A|bool|is_utf8_string_loc|const U8 *s|STRLEN len|const U8 **ep|const STRLEN *el
-
-Like is_utf8_string() but stores the location of the failure (in the
-case of "utf8ness failure") or the location s+len (in the case of
-"utf8ness success") in the C<ep>.
-
-See also is_utf8_string_loclen() and is_utf8_string().
-
-=cut
-*/
-bool
-Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **ep)
-{
- return is_utf8_string_loclen(s, len, ep, 0);
-}
-
-/*
=for apidoc A|UV|utf8n_to_uvuni|const U8 *s|STRLEN curlen|STRLEN *retlen|U32 flags
Bottom level UTF-8 decode routine.
diff --git a/utf8.h b/utf8.h
index 4599407090..9546fe8486 100644
--- a/utf8.h
+++ b/utf8.h
@@ -1,6 +1,6 @@
/* utf8.h
*
- * Copyright (C) 2000, 2001, 2002, by Larry Wall and others
+ * Copyright (C) 2000, 2001, 2002, 2005 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
@@ -332,4 +332,6 @@ encoded character.
#define IS_UTF8_CHAR_FAST(n) ((n) <= 4)
+#define is_utf8_string_loc(s, len, ep) is_utf8_string_loclen(s, len, ep, 0)
+
#endif /* IS_UTF8_CHAR() for UTF-8 */