diff options
author | Miguel de Icaza <miguel@gnome.org> | 2008-10-11 08:56:59 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2008-10-11 08:56:59 +0400 |
commit | 653242de6acdc44a92fb28111eec76a3482692e5 (patch) | |
tree | 613e34f1db9c065cb954ac83e1476e01093b0241 /eglib | |
parent | b1f9f3b7235896427530c7655dc333abf21e9fab (diff) |
2008-10-11 Miguel de Icaza <miguel@novell.com>
* src/glib.h: Move g_strdup here, to consolidate all allocations
in this header, will help for merging the allocation work later.
svn path=/trunk/mono/; revision=115507
Diffstat (limited to 'eglib')
-rw-r--r-- | eglib/ChangeLog | 3 | ||||
-rw-r--r-- | eglib/src/glib.h | 2 | ||||
-rw-r--r-- | eglib/src/gstr.c | 9 |
3 files changed, 4 insertions, 10 deletions
diff --git a/eglib/ChangeLog b/eglib/ChangeLog index 0fc7a17c57d..a52b9c2b4a7 100644 --- a/eglib/ChangeLog +++ b/eglib/ChangeLog @@ -1,5 +1,8 @@ 2008-10-11 Miguel de Icaza <miguel@novell.com> + * src/glib.h: Move g_strdup here, to consolidate all allocations + in this header, will help for merging the allocation work later. + * src/gpattern.c (compile_pattern): From Unity, use -1 in the enum for MatchType. diff --git a/eglib/src/glib.h b/eglib/src/glib.h index 64a48c1e67f..8b42940f9e1 100644 --- a/eglib/src/glib.h +++ b/eglib/src/glib.h @@ -122,7 +122,7 @@ static inline gpointer g_malloc0 (gsize x) {if (x) return calloc(1,x); else retu #define g_alloca(size) alloca (size) gpointer g_memdup (gconstpointer mem, guint byte_size); -gchar *g_strdup (const gchar *str); +static inline gchar *g_strdup (const gchar *str) { if (str) {return strdup (str);} return NULL; } typedef struct { gpointer (*malloc) (gsize n_bytes); diff --git a/eglib/src/gstr.c b/eglib/src/gstr.c index 14ba231c4f3..6a2b963fbd5 100644 --- a/eglib/src/gstr.c +++ b/eglib/src/gstr.c @@ -817,15 +817,6 @@ g_strescape (const gchar *source, const gchar *exceptions) return result; } -gchar * -g_strdup (const gchar *str) -{ - if (str == NULL) - return NULL; - - return strdup (str); -} - gint g_ascii_xdigit_value (gchar c) { |