aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-10-16 23:08:42 -0700
committerGuy Harris <guy@alum.mit.edu>2014-10-17 06:09:11 +0000
commit25d9a7b5f1b880ab283947da28a8216dc9b7e551 (patch)
tree56554c46ac375e522135995b78adc3bfc4f2d876
parent762b8d78ecc001f968b3e0b5f73c22eac4c091ea (diff)
Don't use <ctype.h> macros, and eliminate an include of <ctype.h>.
This avoids locale-dependent tests. Change-Id: I709ff6b1a837fb0390b29f911d3b9ef1015a2d1e Reviewed-on: https://code.wireshark.org/review/4758 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/wslua/wslua.h1
-rw-r--r--epan/wslua/wslua_proto.c3
2 files changed, 1 insertions, 3 deletions
diff --git a/epan/wslua/wslua.h b/epan/wslua/wslua.h
index 5909027273..85b6513c12 100644
--- a/epan/wslua/wslua.h
+++ b/epan/wslua/wslua.h
@@ -33,7 +33,6 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
#include <math.h>
#include <lua.h>
#include <lualib.h>
diff --git a/epan/wslua/wslua_proto.c b/epan/wslua/wslua_proto.c
index 53e580a204..3d57092828 100644
--- a/epan/wslua/wslua_proto.c
+++ b/epan/wslua/wslua_proto.c
@@ -324,8 +324,7 @@ WSLUA_METAMETHOD Prefs__newindex(lua_State* L) {
* underscores, and dots appear in the preference name.
*/
for (c = name; *c != '\0'; c++) {
- if (!isascii((guchar)*c) ||
- (!islower((guchar)*c) && !isdigit((guchar)*c) && *c != '_' && *c != '.'))
+ if (!g_ascii_islower(*c) && !g_ascii_isdigit(*c) && *c != '_' && *c != '.')
{
luaL_error(L,"illegal preference name \"%s\", only lower-case ASCII letters, "
"numbers, underscores and dots may be used", name);