diff options
-rw-r--r-- | epan/wmem/wmem_tree.c | 5 | ||||
-rw-r--r-- | epan/wmem/wmem_tree.h | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/epan/wmem/wmem_tree.c b/epan/wmem/wmem_tree.c index 9208cf9fef..4ad3df2913 100644 --- a/epan/wmem/wmem_tree.c +++ b/epan/wmem/wmem_tree.c @@ -24,7 +24,6 @@ #include "config.h" -#include <ctype.h> #include <string.h> #include <stdio.h> #include <glib.h> @@ -479,8 +478,8 @@ pack_string(const gchar *key, guint32 *divx, guint32 flags) ch = (unsigned char)key[i]; if (flags & WMEM_TREE_STRING_NOCASE) { - if (isupper(ch)) { - ch = tolower(ch); + if (g_ascii_isupper(ch)) { + ch = g_ascii_tolower(ch); } } tmp <<= 8; diff --git a/epan/wmem/wmem_tree.h b/epan/wmem/wmem_tree.h index e7e6b2dc34..4c22824e18 100644 --- a/epan/wmem/wmem_tree.h +++ b/epan/wmem/wmem_tree.h @@ -112,7 +112,10 @@ wmem_tree_lookup32_le(wmem_tree_t *tree, guint32 key); /** Insert a new value under a string key. Like wmem_tree_insert32 but where the * key is a null-terminated string instead of a guint32. You may pass * WMEM_TREE_STRING_NOCASE to the flags argument in order to make it store the - * key in a case-insensitive way. */ + * key in a case-insensitive way. (Note that "case-insensitive" refers + * only to the ASCII letters A-Z and a-z; it is locale-independent. + * Do not expect it to honor the rules of your language; for example, "I" + * will always be mapped to "i". */ WS_DLL_PUBLIC void wmem_tree_insert_string(wmem_tree_t *tree, const gchar* key, void *data, |