GNU bug report logs - #6730
[PATCH] sort: make struct heap private

Previous Next

Package: coreutils;

Reported by: Paul Eggert <eggert <at> CS.UCLA.EDU>

Date: Mon, 26 Jul 2010 04:23:02 UTC

Severity: normal

Tags: notabug, patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6730 in the body.
You can then email your comments to 6730 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6730; Package coreutils. (Mon, 26 Jul 2010 04:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Eggert <eggert <at> CS.UCLA.EDU>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 26 Jul 2010 04:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> CS.UCLA.EDU>
To: Bug Coreutils <bug-coreutils <at> gnu.org>
Subject: [PATCH] sort: make struct heap private
Date: Sun, 25 Jul 2010 21:22:16 -0700
From d36d5c8029fd24a3f8e1e443007ba9a1c8f243e6 Mon Sep 17 00:00:00 2001
From: Paul R. Eggert <eggert <at> cs.ucla.edu>
Date: Sun, 25 Jul 2010 21:18:14 -0700
Subject: [PATCH] sort: make struct heap private

* gl/lib/heap.c (struct heap): Move this here...
* gl/lib/heap.h (struct heap): ... from here, as outside code no
longer needs to access any of these members.
---
 gl/lib/heap.c |    7 +++++++
 gl/lib/heap.h |    8 --------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/gl/lib/heap.c b/gl/lib/heap.c
index baf9a27..80ea70e 100644
--- a/gl/lib/heap.c
+++ b/gl/lib/heap.c
@@ -30,6 +30,13 @@ static size_t heapify_down (void **, size_t, size_t,
 static void heapify_up (void **, size_t,
                         int (*) (void const *, void const *));
 
+struct heap
+{
+  void **array;     /* array[0] is not used */
+  size_t capacity;  /* Array size */
+  size_t count;     /* Used as index to last element. Also is num of items. */
+  int (*compare) (void const *, void const *);
+};
 
 /* Allocate memory for the heap. */
 
diff --git a/gl/lib/heap.h b/gl/lib/heap.h
index b61adf6..cbfeb04 100644
--- a/gl/lib/heap.h
+++ b/gl/lib/heap.h
@@ -20,14 +20,6 @@
 
 #include <stddef.h>
 
-struct heap
-{
-  void **array;     /* array[0] is not used */
-  size_t capacity;  /* Array size */
-  size_t count;     /* Used as index to last element. Also is num of items. */
-  int (*compare) (void const *, void const *);
-};
-
 struct heap *heap_alloc (int (*) (void const *, void const *), size_t);
 void heap_free (struct heap *);
 int heap_insert (struct heap *heap, void *item);
-- 
1.7.1





Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6730; Package coreutils. (Mon, 26 Jul 2010 09:56:02 GMT) Full text and rfc822 format available.

Message #8 received at 6730 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Paul Eggert <eggert <at> CS.UCLA.EDU>
Cc: 6730 <at> debbugs.gnu.org
Subject: Re: bug#6730: [PATCH] sort: make struct heap private
Date: Mon, 26 Jul 2010 10:54:20 +0100
> Subject: [PATCH] sort: make struct heap private
> 
> * gl/lib/heap.c (struct heap): Move this here...
> * gl/lib/heap.h (struct heap): ... from here, as outside code no
> longer needs to access any of these members.

good. closing...

thanks,
Pádraig.




Added tag(s) notabug. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Mon, 26 Jul 2010 10:00:04 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to Paul Eggert <eggert <at> CS.UCLA.EDU> Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Mon, 26 Jul 2010 10:00:05 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 23 Aug 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 307 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.