From e66a0ced67c5e84477e24dc3e3effcd3ed796f61 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Mon, 21 Sep 1998 06:13:06 +0000 Subject: [PATCH] added g_renew() which works as g_new() for g_realloc(). Mon Sep 21 07:43:13 1998 Tim Janik * glib.h: added g_renew() which works as g_new() for g_realloc(). --- ChangeLog | 4 ++++ ChangeLog.pre-2-0 | 4 ++++ ChangeLog.pre-2-10 | 4 ++++ ChangeLog.pre-2-12 | 4 ++++ ChangeLog.pre-2-2 | 4 ++++ ChangeLog.pre-2-4 | 4 ++++ ChangeLog.pre-2-6 | 4 ++++ ChangeLog.pre-2-8 | 4 ++++ glib.h | 18 +++++++++--------- glib/glib.h | 18 +++++++++--------- 10 files changed, 50 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 054416d..eb11010 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Sep 21 07:43:13 1998 Tim Janik + + * glib.h: added g_renew() which works as g_new() for g_realloc(). + Mon Sep 21 02:22:12 1998 Tim Janik * NEWS file update for upcoming release of GLib + GModule diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 054416d..eb11010 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,7 @@ +Mon Sep 21 07:43:13 1998 Tim Janik + + * glib.h: added g_renew() which works as g_new() for g_realloc(). + Mon Sep 21 02:22:12 1998 Tim Janik * NEWS file update for upcoming release of GLib + GModule diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 054416d..eb11010 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,7 @@ +Mon Sep 21 07:43:13 1998 Tim Janik + + * glib.h: added g_renew() which works as g_new() for g_realloc(). + Mon Sep 21 02:22:12 1998 Tim Janik * NEWS file update for upcoming release of GLib + GModule diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 054416d..eb11010 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,7 @@ +Mon Sep 21 07:43:13 1998 Tim Janik + + * glib.h: added g_renew() which works as g_new() for g_realloc(). + Mon Sep 21 02:22:12 1998 Tim Janik * NEWS file update for upcoming release of GLib + GModule diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 054416d..eb11010 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,7 @@ +Mon Sep 21 07:43:13 1998 Tim Janik + + * glib.h: added g_renew() which works as g_new() for g_realloc(). + Mon Sep 21 02:22:12 1998 Tim Janik * NEWS file update for upcoming release of GLib + GModule diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 054416d..eb11010 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,7 @@ +Mon Sep 21 07:43:13 1998 Tim Janik + + * glib.h: added g_renew() which works as g_new() for g_realloc(). + Mon Sep 21 02:22:12 1998 Tim Janik * NEWS file update for upcoming release of GLib + GModule diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 054416d..eb11010 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,7 @@ +Mon Sep 21 07:43:13 1998 Tim Janik + + * glib.h: added g_renew() which works as g_new() for g_realloc(). + Mon Sep 21 02:22:12 1998 Tim Janik * NEWS file update for upcoming release of GLib + GModule diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 054416d..eb11010 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,7 @@ +Mon Sep 21 07:43:13 1998 Tim Janik + + * glib.h: added g_renew() which works as g_new() for g_realloc(). + Mon Sep 21 02:22:12 1998 Tim Janik * NEWS file update for upcoming release of GLib + GModule diff --git a/glib.h b/glib.h index eea0bbb..784df82 100644 --- a/glib.h +++ b/glib.h @@ -303,16 +303,16 @@ extern "C" { */ #ifdef __DMALLOC_H__ - -#define g_new(type, count) (ALLOC (type, count)) -#define g_new0(type, count) (CALLOC (type, count)) - +# define g_new(type, count) (ALLOC (type, count)) +# define g_new0(type, count) (CALLOC (type, count)) +# define g_renew(type, mem, count) (REALLOC (mem, type, count)) #else /* __DMALLOC_H__ */ - -#define g_new(type, count) \ - ((type *) g_malloc ((unsigned) sizeof (type) * (count))) -#define g_new0(type, count) \ - ((type *) g_malloc0 ((unsigned) sizeof (type) * (count))) +# define g_new(type, count) \ + ((type *) g_malloc ((unsigned) sizeof (type) * (count))) +# define g_new0(type, count) \ + ((type *) g_malloc0 ((unsigned) sizeof (type) * (count))) +# define g_renew(type, mem, count) \ + ((type *) g_realloc (mem, (unsigned) sizeof (type) * (count))) #endif /* __DMALLOC_H__ */ #define g_mem_chunk_create(type, pre_alloc, alloc_type) ( \ diff --git a/glib/glib.h b/glib/glib.h index eea0bbb..784df82 100644 --- a/glib/glib.h +++ b/glib/glib.h @@ -303,16 +303,16 @@ extern "C" { */ #ifdef __DMALLOC_H__ - -#define g_new(type, count) (ALLOC (type, count)) -#define g_new0(type, count) (CALLOC (type, count)) - +# define g_new(type, count) (ALLOC (type, count)) +# define g_new0(type, count) (CALLOC (type, count)) +# define g_renew(type, mem, count) (REALLOC (mem, type, count)) #else /* __DMALLOC_H__ */ - -#define g_new(type, count) \ - ((type *) g_malloc ((unsigned) sizeof (type) * (count))) -#define g_new0(type, count) \ - ((type *) g_malloc0 ((unsigned) sizeof (type) * (count))) +# define g_new(type, count) \ + ((type *) g_malloc ((unsigned) sizeof (type) * (count))) +# define g_new0(type, count) \ + ((type *) g_malloc0 ((unsigned) sizeof (type) * (count))) +# define g_renew(type, mem, count) \ + ((type *) g_realloc (mem, (unsigned) sizeof (type) * (count))) #endif /* __DMALLOC_H__ */ #define g_mem_chunk_create(type, pre_alloc, alloc_type) ( \ -- 2.7.4