mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-12 05:39:21 +01:00
Use memset; might be faster if someone used this for a biiig string.
Wed Sep 26 11:00:31 2001 Owen Taylor <otaylor@redhat.com> * glib/gstrfuncs.c (g_strnfill): Use memset; might be faster if someone used this for a biiig string. (Suggestion from Jakub Jelinek)
This commit is contained in:
parent
0208965f0f
commit
44dfc68e30
@ -1,3 +1,9 @@
|
|||||||
|
Wed Sep 26 11:00:31 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gstrfuncs.c (g_strnfill): Use memset; might be
|
||||||
|
faster if someone used this for a biiig string.
|
||||||
|
(Suggestion from Jakub Jelinek)
|
||||||
|
|
||||||
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Sep 26 11:00:31 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gstrfuncs.c (g_strnfill): Use memset; might be
|
||||||
|
faster if someone used this for a biiig string.
|
||||||
|
(Suggestion from Jakub Jelinek)
|
||||||
|
|
||||||
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Sep 26 11:00:31 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gstrfuncs.c (g_strnfill): Use memset; might be
|
||||||
|
faster if someone used this for a biiig string.
|
||||||
|
(Suggestion from Jakub Jelinek)
|
||||||
|
|
||||||
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Sep 26 11:00:31 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gstrfuncs.c (g_strnfill): Use memset; might be
|
||||||
|
faster if someone used this for a biiig string.
|
||||||
|
(Suggestion from Jakub Jelinek)
|
||||||
|
|
||||||
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Sep 26 11:00:31 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gstrfuncs.c (g_strnfill): Use memset; might be
|
||||||
|
faster if someone used this for a biiig string.
|
||||||
|
(Suggestion from Jakub Jelinek)
|
||||||
|
|
||||||
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Sep 26 11:00:31 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gstrfuncs.c (g_strnfill): Use memset; might be
|
||||||
|
faster if someone used this for a biiig string.
|
||||||
|
(Suggestion from Jakub Jelinek)
|
||||||
|
|
||||||
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Sep 26 11:00:31 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gstrfuncs.c (g_strnfill): Use memset; might be
|
||||||
|
faster if someone used this for a biiig string.
|
||||||
|
(Suggestion from Jakub Jelinek)
|
||||||
|
|
||||||
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Sep 26 11:00:31 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* glib/gstrfuncs.c (g_strnfill): Use memset; might be
|
||||||
|
faster if someone used this for a biiig string.
|
||||||
|
(Suggestion from Jakub Jelinek)
|
||||||
|
|
||||||
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
2001-09-26 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
* configure.in: (Win32:) Move the Win32 check closer to the start,
|
||||||
|
@ -133,14 +133,11 @@ gchar*
|
|||||||
g_strnfill (gsize length,
|
g_strnfill (gsize length,
|
||||||
gchar fill_char)
|
gchar fill_char)
|
||||||
{
|
{
|
||||||
register gchar *str, *s, *end;
|
gchar *str;
|
||||||
|
|
||||||
str = g_new (gchar, length + 1);
|
str = g_new (gchar, length + 1);
|
||||||
s = str;
|
memset (str, (guchar)fill_char, length);
|
||||||
end = str + length;
|
str[length] = '\0';
|
||||||
while (s < end)
|
|
||||||
*(s++) = fill_char;
|
|
||||||
*s = 0;
|
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user