for G_CAN_INLINE environments, inline g_string_append_c() for efficiency.

Thu Feb 19 18:40:01 2004  Tim Janik  <timj@gtk.org>

        * glib/gstring.[hc]: for G_CAN_INLINE environments, inline
        g_string_append_c() for efficiency. (vaguely based on #118707).
This commit is contained in:
Tim Janik 2004-02-19 17:42:00 +00:00 committed by Tim Janik
parent ca87afd2e1
commit c0930e2c71
10 changed files with 111 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Thu Feb 19 18:40:01 2004 Tim Janik <timj@gtk.org>
* glib/gstring.[hc]: for G_CAN_INLINE environments, inline
g_string_append_c() for efficiency. (vaguely based on #118707).
Wed Feb 18 23:57:42 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Include signal.h for SIGCHLD. (#134622, Damien

View File

@ -1,3 +1,8 @@
Thu Feb 19 18:40:01 2004 Tim Janik <timj@gtk.org>
* glib/gstring.[hc]: for G_CAN_INLINE environments, inline
g_string_append_c() for efficiency. (vaguely based on #118707).
Wed Feb 18 23:57:42 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Include signal.h for SIGCHLD. (#134622, Damien

View File

@ -1,3 +1,8 @@
Thu Feb 19 18:40:01 2004 Tim Janik <timj@gtk.org>
* glib/gstring.[hc]: for G_CAN_INLINE environments, inline
g_string_append_c() for efficiency. (vaguely based on #118707).
Wed Feb 18 23:57:42 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Include signal.h for SIGCHLD. (#134622, Damien

View File

@ -1,3 +1,8 @@
Thu Feb 19 18:40:01 2004 Tim Janik <timj@gtk.org>
* glib/gstring.[hc]: for G_CAN_INLINE environments, inline
g_string_append_c() for efficiency. (vaguely based on #118707).
Wed Feb 18 23:57:42 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Include signal.h for SIGCHLD. (#134622, Damien

View File

@ -1,3 +1,8 @@
Thu Feb 19 18:40:01 2004 Tim Janik <timj@gtk.org>
* glib/gstring.[hc]: for G_CAN_INLINE environments, inline
g_string_append_c() for efficiency. (vaguely based on #118707).
Wed Feb 18 23:57:42 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Include signal.h for SIGCHLD. (#134622, Damien

View File

@ -1,3 +1,8 @@
Thu Feb 19 18:40:01 2004 Tim Janik <timj@gtk.org>
* glib/gstring.[hc]: for G_CAN_INLINE environments, inline
g_string_append_c() for efficiency. (vaguely based on #118707).
Wed Feb 18 23:57:42 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Include signal.h for SIGCHLD. (#134622, Damien

View File

@ -107,6 +107,17 @@ This string should be freed when no longer needed.
not be changed.
<!-- ##### FUNCTION g_completion_complete_utf8 ##### -->
<para>
</para>
@cmp:
@prefix:
@new_prefix:
@Returns:
<!-- ##### FUNCTION g_completion_set_compare ##### -->
<para>
Sets the function to use for string comparisons. The default

View File

@ -585,6 +585,55 @@ for the default main context.
@Returns:
<!-- ##### TYPEDEF GPid ##### -->
<para>
</para>
<!-- ##### USER_FUNCTION GChildWatchFunc ##### -->
<para>
</para>
@pid:
@status:
@data:
<!-- ##### FUNCTION g_child_watch_source_new ##### -->
<para>
</para>
@pid:
@Returns:
<!-- ##### FUNCTION g_child_watch_add ##### -->
<para>
</para>
@pid:
@function:
@data:
@Returns:
<!-- ##### FUNCTION g_child_watch_add_full ##### -->
<para>
</para>
@priority:
@pid:
@function:
@data:
@notify:
@Returns:
<!-- ##### STRUCT GPollFD ##### -->
<para>

View File

@ -515,6 +515,7 @@ g_string_append_len (GString *string,
return g_string_insert_len (string, -1, val, len);
}
#undef g_string_append_c
GString*
g_string_append_c (GString *string,
gchar c)

View File

@ -29,6 +29,7 @@
#include <glib/gtypes.h>
#include <glib/gunicode.h>
#include <glib/gutils.h> /* for G_CAN_INLINE */
G_BEGIN_DECLS
@ -115,6 +116,25 @@ void g_string_append_printf (GString *string,
const gchar *format,
...) G_GNUC_PRINTF (2, 3);
/* -- optimize g_strig_append_c --- */
#ifdef G_CAN_INLINE
static inline GString*
g_string_append_c_inline (GString *gstring,
gchar c)
{
if (gstring->len < gstring->allocated_len && 0)
{
gstring->str[gstring->len++] = c;
gstring->str[gstring->len] = 0;
}
else
g_string_insert_c (gstring, -1, c);
return gstring;
}
#define g_string_append_c(gstr,c) g_string_append_c_inline (gstr, c)
#endif /* G_CAN_INLINE */
#ifndef G_DISABLE_DEPRECATED
/* The following two functions are deprecated and will be removed in