Author: stefan2
Date: Thu Sep 6 21:34:21 2012
New Revision: 1381767
URL: http://svn.apache.org/viewvc?rev=1381767&view=rev
Log:
Minor UTF conversion optimization: use the most suitable
variant of the UTF-8 checking functions.
* subversion/libsvn_subr/utf.c
(svn_utf_cstring_from_utf8,
svn_utf_cstring_from_utf8_ex2): call the cstring variants
and let them determine the string length as they go
Modified:
subversion/trunk/subversion/libsvn_subr/utf.c
Modified: subversion/trunk/subversion/libsvn_subr/utf.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf.c?rev=1381767&r1=1381766&r2=1381767&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf.c (original)
+++ subversion/trunk/subversion/libsvn_subr/utf.c Thu Sep 6 21:34:21 2012
@@ -939,7 +939,7 @@ svn_utf_cstring_from_utf8(const char **d
xlate_handle_node_t *node;
svn_error_t *err;
- SVN_ERR(check_utf8(src, strlen(src), pool));
+ SVN_ERR(check_cstring_utf8(src, pool));
SVN_ERR(get_uton_xlate_handle_node(&node, pool));
err = convert_cstring(dest, src, node, pool);
@@ -960,7 +960,7 @@ svn_utf_cstring_from_utf8_ex2(const char
const char *convset_key = get_xlate_key(topage, SVN_APR_UTF8_CHARSET,
pool);
- SVN_ERR(check_utf8(src, strlen(src), pool));
+ SVN_ERR(check_cstring_utf8(src, pool));
SVN_ERR(get_xlate_handle_node(&node, topage, SVN_APR_UTF8_CHARSET,
convset_key, pool));