mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
Use a switch here, maybe helps the compiler optimize things. Also, ' ' is
2000-11-16 Havoc Pennington <hp@redhat.com> * guniprop.c (g_unichar_isspace): Use a switch here, maybe helps the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR, so don't special case it.
This commit is contained in:
parent
b24f1d179e
commit
399ad0b8b0
@ -1,3 +1,9 @@
|
||||
2000-11-16 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* guniprop.c (g_unichar_isspace): Use a switch here, maybe helps
|
||||
the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR,
|
||||
so don't special case it.
|
||||
|
||||
2000-11-17 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add g_trash_stack entry points.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2000-11-16 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* guniprop.c (g_unichar_isspace): Use a switch here, maybe helps
|
||||
the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR,
|
||||
so don't special case it.
|
||||
|
||||
2000-11-17 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add g_trash_stack entry points.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2000-11-16 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* guniprop.c (g_unichar_isspace): Use a switch here, maybe helps
|
||||
the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR,
|
||||
so don't special case it.
|
||||
|
||||
2000-11-17 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add g_trash_stack entry points.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2000-11-16 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* guniprop.c (g_unichar_isspace): Use a switch here, maybe helps
|
||||
the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR,
|
||||
so don't special case it.
|
||||
|
||||
2000-11-17 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add g_trash_stack entry points.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2000-11-16 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* guniprop.c (g_unichar_isspace): Use a switch here, maybe helps
|
||||
the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR,
|
||||
so don't special case it.
|
||||
|
||||
2000-11-17 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add g_trash_stack entry points.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2000-11-16 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* guniprop.c (g_unichar_isspace): Use a switch here, maybe helps
|
||||
the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR,
|
||||
so don't special case it.
|
||||
|
||||
2000-11-17 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add g_trash_stack entry points.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2000-11-16 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* guniprop.c (g_unichar_isspace): Use a switch here, maybe helps
|
||||
the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR,
|
||||
so don't special case it.
|
||||
|
||||
2000-11-17 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add g_trash_stack entry points.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2000-11-16 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* guniprop.c (g_unichar_isspace): Use a switch here, maybe helps
|
||||
the compiler optimize things. Also, ' ' is a SPACE_SEPARATOR,
|
||||
so don't special case it.
|
||||
|
||||
2000-11-17 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add g_trash_stack entry points.
|
||||
|
@ -118,15 +118,24 @@ g_unichar_ispunct (gunichar c)
|
||||
gboolean
|
||||
g_unichar_isspace (gunichar c)
|
||||
{
|
||||
/* special-case these since Unicode thinks they are not spaces */
|
||||
if (c == ' ' || c == '\t' || c == '\n' || c == '\r' ||
|
||||
c == '\f' || c == '\v') /* "the mythical vertical tab" */
|
||||
return TRUE;
|
||||
else
|
||||
switch (c)
|
||||
{
|
||||
int t = TYPE (c);
|
||||
return (t == G_UNICODE_SPACE_SEPARATOR || t == G_UNICODE_LINE_SEPARATOR
|
||||
|| t == G_UNICODE_PARAGRAPH_SEPARATOR);
|
||||
/* special-case these since Unicode thinks they are not spaces */
|
||||
case '\t':
|
||||
case '\n':
|
||||
case '\r':
|
||||
case '\f':
|
||||
case '\v': /* vertical tab - as if anyone has ever used this... */
|
||||
return TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
int t = TYPE (c);
|
||||
return (t == G_UNICODE_SPACE_SEPARATOR || t == G_UNICODE_LINE_SEPARATOR
|
||||
|| t == G_UNICODE_PARAGRAPH_SEPARATOR);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
25
guniprop.c
25
guniprop.c
@ -118,15 +118,24 @@ g_unichar_ispunct (gunichar c)
|
||||
gboolean
|
||||
g_unichar_isspace (gunichar c)
|
||||
{
|
||||
/* special-case these since Unicode thinks they are not spaces */
|
||||
if (c == ' ' || c == '\t' || c == '\n' || c == '\r' ||
|
||||
c == '\f' || c == '\v') /* "the mythical vertical tab" */
|
||||
return TRUE;
|
||||
else
|
||||
switch (c)
|
||||
{
|
||||
int t = TYPE (c);
|
||||
return (t == G_UNICODE_SPACE_SEPARATOR || t == G_UNICODE_LINE_SEPARATOR
|
||||
|| t == G_UNICODE_PARAGRAPH_SEPARATOR);
|
||||
/* special-case these since Unicode thinks they are not spaces */
|
||||
case '\t':
|
||||
case '\n':
|
||||
case '\r':
|
||||
case '\f':
|
||||
case '\v': /* vertical tab - as if anyone has ever used this... */
|
||||
return TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
int t = TYPE (c);
|
||||
return (t == G_UNICODE_SPACE_SEPARATOR || t == G_UNICODE_LINE_SEPARATOR
|
||||
|| t == G_UNICODE_PARAGRAPH_SEPARATOR);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user