diff options
author | CDT 1998 Shawn T. Amundson <amundson@gtk.org> | 1998-09-15 03:12:54 +0000 |
---|---|---|
committer | Shawn Amundson <amundson@src.gnome.org> | 1998-09-15 03:12:54 +0000 |
commit | c2f99dd1684d90d8581c39366cefa54a16380ecc (patch) | |
tree | 3c320a791169d1a5ab31951e6be3491666f3ca01 | |
parent | fb00a59c2f6d38b46f429f9b567562cc282d04eb (diff) | |
download | gtk+-c2f99dd1684d90d8581c39366cefa54a16380ecc.tar.gz |
changed g_new()s to malloc()s and g_free()s to free()s to avoid mixing
Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* gdk/gdkimage.c: changed g_new()s to malloc()s and
g_free()s to free()s to avoid mixing g_new()s with
free()s. X itself uses free() on some of the
malloced memory.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 7 | ||||
-rw-r--r-- | gdk/gdkimage.c | 33 | ||||
-rw-r--r-- | gdk/x11/gdkimage-x11.c | 33 |
9 files changed, 81 insertions, 34 deletions
@@ -1,3 +1,10 @@ +Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org> + + * gdk/gdkimage.c: changed g_new()s to malloc()s and + g_free()s to free()s to avoid mixing g_new()s with + free()s. X itself uses free() on some of the + malloced memory. + Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com> * gtkfilesel.c: Maintain a list of directories like diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index e8b4f27901..57f1c16d76 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org> + + * gdk/gdkimage.c: changed g_new()s to malloc()s and + g_free()s to free()s to avoid mixing g_new()s with + free()s. X itself uses free() on some of the + malloced memory. + Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com> * gtkfilesel.c: Maintain a list of directories like diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e8b4f27901..57f1c16d76 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org> + + * gdk/gdkimage.c: changed g_new()s to malloc()s and + g_free()s to free()s to avoid mixing g_new()s with + free()s. X itself uses free() on some of the + malloced memory. + Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com> * gtkfilesel.c: Maintain a list of directories like diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index e8b4f27901..57f1c16d76 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org> + + * gdk/gdkimage.c: changed g_new()s to malloc()s and + g_free()s to free()s to avoid mixing g_new()s with + free()s. X itself uses free() on some of the + malloced memory. + Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com> * gtkfilesel.c: Maintain a list of directories like diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index e8b4f27901..57f1c16d76 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org> + + * gdk/gdkimage.c: changed g_new()s to malloc()s and + g_free()s to free()s to avoid mixing g_new()s with + free()s. X itself uses free() on some of the + malloced memory. + Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com> * gtkfilesel.c: Maintain a list of directories like diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index e8b4f27901..57f1c16d76 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org> + + * gdk/gdkimage.c: changed g_new()s to malloc()s and + g_free()s to free()s to avoid mixing g_new()s with + free()s. X itself uses free() on some of the + malloced memory. + Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com> * gtkfilesel.c: Maintain a list of directories like diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e8b4f27901..57f1c16d76 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Mon Sep 14 21:47:35 CDT 1998 Shawn T. Amundson <amundson@gtk.org> + + * gdk/gdkimage.c: changed g_new()s to malloc()s and + g_free()s to free()s to avoid mixing g_new()s with + free()s. X itself uses free() on some of the + malloced memory. + Sat Sep 12 10:44:06 1998 Owen Taylor <otaylor@redhat.com> * gtkfilesel.c: Maintain a list of directories like diff --git a/gdk/gdkimage.c b/gdk/gdkimage.c index c31ab4e5be..c7f426581a 100644 --- a/gdk/gdkimage.c +++ b/gdk/gdkimage.c @@ -84,7 +84,7 @@ gdk_image_new_bitmap(GdkVisual *visual, gpointer data, gint w, gint h) Visual *xvisual; GdkImage *image; GdkImagePrivate *private; - private = g_new(GdkImagePrivate, 1); + private = malloc (sizeof (GdkImagePrivate)); image = (GdkImage *) private; private->xdisplay = gdk_display; private->image_put = gdk_image_put_normal; @@ -165,7 +165,7 @@ gdk_image_new (GdkImageType type, break; default: - private = g_new (GdkImagePrivate, 1); + private = malloc (sizeof (GdkImagePrivate)); image = (GdkImage*) private; private->xdisplay = gdk_display; @@ -187,7 +187,7 @@ gdk_image_new (GdkImageType type, { private->image_put = gdk_image_put_shared; - private->x_shm_info = g_new (XShmSegmentInfo, 1); + private->x_shm_info = malloc (sizeof (XShmSegmentInfo)); x_shm_info = private->x_shm_info; private->ximage = XShmCreateImage (private->xdisplay, xvisual, visual->depth, @@ -196,7 +196,7 @@ gdk_image_new (GdkImageType type, { g_warning ("XShmCreateImage failed"); - g_free (image); + free (image); gdk_use_xshm = False; return NULL; } @@ -210,8 +210,8 @@ gdk_image_new (GdkImageType type, g_warning ("shmget failed!"); XDestroyImage (private->ximage); - g_free (private->x_shm_info); - g_free (image); + free (private->x_shm_info); + free (image); gdk_use_xshm = False; return NULL; @@ -228,8 +228,8 @@ gdk_image_new (GdkImageType type, XDestroyImage (private->ximage); shmctl (x_shm_info->shmid, IPC_RMID, 0); - g_free (private->x_shm_info); - g_free (image); + free (private->x_shm_info); + free (image); return NULL; } @@ -253,8 +253,8 @@ gdk_image_new (GdkImageType type, shmdt (x_shm_info->shmaddr); shmctl (x_shm_info->shmid, IPC_RMID, 0); - g_free (private->x_shm_info); - g_free (image); + free (private->x_shm_info); + free (image); gdk_use_xshm = False; return NULL; @@ -265,12 +265,12 @@ gdk_image_new (GdkImageType type, } else { - g_free (image); + free (image); return NULL; } break; #else /* USE_SHM */ - g_free (image); + free (image); return NULL; #endif /* USE_SHM */ case GDK_IMAGE_NORMAL: @@ -279,8 +279,7 @@ gdk_image_new (GdkImageType type, private->ximage = XCreateImage (private->xdisplay, xvisual, visual->depth, ZPixmap, 0, 0, width, height, 32, 0); - private->ximage->data = g_new (char, private->ximage->bytes_per_line * - private->ximage->height); + private->ximage->data = malloc (sizeof (char) * private->ximage->bytes_per_line * private->ximage->height); break; case GDK_IMAGE_FASTEST: @@ -331,7 +330,7 @@ gdk_image_get (GdkWindow *window, if (win_private->destroyed) return NULL; - private = g_new (GdkImagePrivate, 1); + private = malloc (sizeof (GdkImagePrivate)); image = (GdkImage*) private; private->xdisplay = gdk_display; @@ -412,7 +411,7 @@ gdk_image_destroy (GdkImage *image) shmdt (x_shm_info->shmaddr); shmctl (x_shm_info->shmid, IPC_RMID, 0); - g_free (private->x_shm_info); + free (private->x_shm_info); image_list = g_list_remove (image_list, image); #else /* USE_SHM */ @@ -424,7 +423,7 @@ gdk_image_destroy (GdkImage *image) g_assert_not_reached (); } - g_free (image); + free (image); } static void diff --git a/gdk/x11/gdkimage-x11.c b/gdk/x11/gdkimage-x11.c index c31ab4e5be..c7f426581a 100644 --- a/gdk/x11/gdkimage-x11.c +++ b/gdk/x11/gdkimage-x11.c @@ -84,7 +84,7 @@ gdk_image_new_bitmap(GdkVisual *visual, gpointer data, gint w, gint h) Visual *xvisual; GdkImage *image; GdkImagePrivate *private; - private = g_new(GdkImagePrivate, 1); + private = malloc (sizeof (GdkImagePrivate)); image = (GdkImage *) private; private->xdisplay = gdk_display; private->image_put = gdk_image_put_normal; @@ -165,7 +165,7 @@ gdk_image_new (GdkImageType type, break; default: - private = g_new (GdkImagePrivate, 1); + private = malloc (sizeof (GdkImagePrivate)); image = (GdkImage*) private; private->xdisplay = gdk_display; @@ -187,7 +187,7 @@ gdk_image_new (GdkImageType type, { private->image_put = gdk_image_put_shared; - private->x_shm_info = g_new (XShmSegmentInfo, 1); + private->x_shm_info = malloc (sizeof (XShmSegmentInfo)); x_shm_info = private->x_shm_info; private->ximage = XShmCreateImage (private->xdisplay, xvisual, visual->depth, @@ -196,7 +196,7 @@ gdk_image_new (GdkImageType type, { g_warning ("XShmCreateImage failed"); - g_free (image); + free (image); gdk_use_xshm = False; return NULL; } @@ -210,8 +210,8 @@ gdk_image_new (GdkImageType type, g_warning ("shmget failed!"); XDestroyImage (private->ximage); - g_free (private->x_shm_info); - g_free (image); + free (private->x_shm_info); + free (image); gdk_use_xshm = False; return NULL; @@ -228,8 +228,8 @@ gdk_image_new (GdkImageType type, XDestroyImage (private->ximage); shmctl (x_shm_info->shmid, IPC_RMID, 0); - g_free (private->x_shm_info); - g_free (image); + free (private->x_shm_info); + free (image); return NULL; } @@ -253,8 +253,8 @@ gdk_image_new (GdkImageType type, shmdt (x_shm_info->shmaddr); shmctl (x_shm_info->shmid, IPC_RMID, 0); - g_free (private->x_shm_info); - g_free (image); + free (private->x_shm_info); + free (image); gdk_use_xshm = False; return NULL; @@ -265,12 +265,12 @@ gdk_image_new (GdkImageType type, } else { - g_free (image); + free (image); return NULL; } break; #else /* USE_SHM */ - g_free (image); + free (image); return NULL; #endif /* USE_SHM */ case GDK_IMAGE_NORMAL: @@ -279,8 +279,7 @@ gdk_image_new (GdkImageType type, private->ximage = XCreateImage (private->xdisplay, xvisual, visual->depth, ZPixmap, 0, 0, width, height, 32, 0); - private->ximage->data = g_new (char, private->ximage->bytes_per_line * - private->ximage->height); + private->ximage->data = malloc (sizeof (char) * private->ximage->bytes_per_line * private->ximage->height); break; case GDK_IMAGE_FASTEST: @@ -331,7 +330,7 @@ gdk_image_get (GdkWindow *window, if (win_private->destroyed) return NULL; - private = g_new (GdkImagePrivate, 1); + private = malloc (sizeof (GdkImagePrivate)); image = (GdkImage*) private; private->xdisplay = gdk_display; @@ -412,7 +411,7 @@ gdk_image_destroy (GdkImage *image) shmdt (x_shm_info->shmaddr); shmctl (x_shm_info->shmid, IPC_RMID, 0); - g_free (private->x_shm_info); + free (private->x_shm_info); image_list = g_list_remove (image_list, image); #else /* USE_SHM */ @@ -424,7 +423,7 @@ gdk_image_destroy (GdkImage *image) g_assert_not_reached (); } - g_free (image); + free (image); } static void |