Use g_ascii_isspace instead of isspace because the later is slower and we
only need to deal with ascii.
This commit is contained in:
@@ -51,7 +51,7 @@ char *
|
|||||||
skip_token (const char *p)
|
skip_token (const char *p)
|
||||||
{
|
{
|
||||||
p = next_token(p);
|
p = next_token(p);
|
||||||
while (*p && !isspace(*p)) p++;
|
while (*p && !g_ascii_isspace(*p)) p++;
|
||||||
p = next_token(p);
|
p = next_token(p);
|
||||||
return (char *)p;
|
return (char *)p;
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,7 @@ G_BEGIN_DECLS
|
|||||||
static inline char*
|
static inline char*
|
||||||
next_token(const char *p)
|
next_token(const char *p)
|
||||||
{
|
{
|
||||||
while (isspace(*p)) p++;
|
while (g_ascii_isspace(*p)) p++;
|
||||||
return (char*) p;
|
return (char*) p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user