You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2012/11/07 12:05:06 UTC
svn commit: r1406545 -
/subversion/branches/wc-collate-path/subversion/libsvn_subr/sqlite.c
Author: brane
Date: Wed Nov 7 11:05:06 2012
New Revision: 1406545
URL: http://svn.apache.org/viewvc?rev=1406545&view=rev
Log:
On the wc-collate-path branch: Fix Thinko in Collation, and other stories.
* subversion/libsvn_subr/sqlite.c
(collate_ucs_nfd): Renamed from compare_normalized_unicode.
Use the correct lengths when calling svn_utf__ucs4cmp.
(svn_sqlite__open): Lowercase collation name to "svn-ucs-nfd".
Modified:
subversion/branches/wc-collate-path/subversion/libsvn_subr/sqlite.c
Modified: subversion/branches/wc-collate-path/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/wc-collate-path/subversion/libsvn_subr/sqlite.c?rev=1406545&r1=1406544&r2=1406545&view=diff
==============================================================================
--- subversion/branches/wc-collate-path/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/wc-collate-path/subversion/libsvn_subr/sqlite.c Wed Nov 7 11:05:06 2012
@@ -863,9 +863,9 @@ close_apr(void *data)
/* Unicode normalizing collation for WC paths */
static int
-compare_normalized_unicode(void *baton,
- int len1, const void *key1,
- int len2, const void *key2)
+collate_ucs_nfd(void *baton,
+ int len1, const void *key1,
+ int len2, const void *key2)
{
svn_sqlite__db_t *db = baton;
apr_size_t rlen1;
@@ -911,8 +911,7 @@ compare_normalized_unicode(void *baton,
db->nfd_len2 * sizeof(*db->nfd_buf2));
}
- return svn_utf__ucs4cmp(db->nfd_buf1, db->nfd_len1,
- db->nfd_buf2, db->nfd_len2);
+ return svn_utf__ucs4cmp(db->nfd_buf1, rlen1, db->nfd_buf2, rlen2);
}
@@ -935,8 +934,8 @@ svn_sqlite__open(svn_sqlite__db_t **db,
(*db)->nfd_buf2 = apr_palloc(result_pool,
(*db)->nfd_len2 * sizeof(*(*db)->nfd_buf2));
SQLITE_ERR(sqlite3_create_collation((*db)->db3,
- "SVN-UCS-NFD", SQLITE_UTF8,
- *db, compare_normalized_unicode),
+ "svn-ucs-nfd", SQLITE_UTF8,
+ *db, collate_ucs_nfd),
*db);
#ifdef SQLITE3_DEBUG