lib/icu/Collate: remove GLib implementation
There is not much use in GLib: on Windows, we have a native API for string collation, and the rest uses either libicu or the standard C library calls.
This commit is contained in:
parent
fb3564fbe7
commit
6f7bfa71a9
@ -31,8 +31,6 @@
|
|||||||
|
|
||||||
#include <unicode/ucol.h>
|
#include <unicode/ucol.h>
|
||||||
#include <unicode/ustring.h>
|
#include <unicode/ustring.h>
|
||||||
#elif defined(HAVE_GLIB)
|
|
||||||
#include <glib.h>
|
|
||||||
#else
|
#else
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -134,8 +132,6 @@ IcuCollate(const char *a, const char *b)
|
|||||||
result -= 2;
|
result -= 2;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
#elif defined(HAVE_GLIB)
|
|
||||||
return g_utf8_collate(a, b);
|
|
||||||
#else
|
#else
|
||||||
return strcoll(a, b);
|
return strcoll(a, b);
|
||||||
#endif
|
#endif
|
||||||
@ -201,11 +197,6 @@ IcuCaseFold(const char *src)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
#elif defined(HAVE_GLIB)
|
|
||||||
char *tmp = g_utf8_casefold(src, -1);
|
|
||||||
auto result = AllocatedString<>::Duplicate(tmp);
|
|
||||||
g_free(tmp);
|
|
||||||
return result;
|
|
||||||
#else
|
#else
|
||||||
size_t size = strlen(src) + 1;
|
size_t size = strlen(src) + 1;
|
||||||
auto buffer = new char[size];
|
auto buffer = new char[size];
|
||||||
|
Loading…
Reference in New Issue
Block a user