diff options
author | Edward Thomson <ethomson@microsoft.com> | 2015-05-29 16:56:38 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2015-05-29 18:16:46 -0400 |
commit | 75a4636f502908ddd406a69a4b065e29b79276da (patch) | |
tree | 8e2a514a518e4efd4746c31e629a8cf7120afcd7 /src/netops.c | |
parent | 006548da91bfe05375ae0e786c6c13e9bad85a40 (diff) | |
download | libgit2-75a4636f502908ddd406a69a4b065e29b79276da.tar.gz |
git__tolower: a tolower() that isn't dumb
Some brain damaged tolower() implementations appear to want to
take the locale into account, and this may require taking some
insanely aggressive lock on the locale and slowing down what should
be the most trivial of trivial calls for people who just want to
downcase ASCII.
Diffstat (limited to 'src/netops.c')
-rw-r--r-- | src/netops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/netops.c b/src/netops.c index 6047cf1ac..5e8075597 100644 --- a/src/netops.c +++ b/src/netops.c @@ -84,7 +84,7 @@ void gitno_consume_n(gitno_buffer *buf, size_t cons) int gitno__match_host(const char *pattern, const char *host) { for (;;) { - char c = tolower(*pattern++); + char c = git__tolower(*pattern++); if (c == '\0') return *host ? -1 : 0; @@ -102,7 +102,7 @@ int gitno__match_host(const char *pattern, const char *host) */ while(*host) { - char h = tolower(*host); + char h = git__tolower(*host); if (c == h) return gitno__match_host(pattern, host++); if (h == '.') @@ -112,7 +112,7 @@ int gitno__match_host(const char *pattern, const char *host) return -1; } - if (c != tolower(*host++)) + if (c != git__tolower(*host++)) return -1; } |