Re: Upcoming GLib changes
- From: Scott Wimer <scottw cgibuilder com>
- To: gtk-devel-list redhat com
- Subject: Re: Upcoming GLib changes
- Date: Fri, 2 Jul 1999 11:28:20 -0400 (EDT)
On Thu, 1 Jul 1999, Damon Chaplin wrote:
> I agree with this. I think:
>
> g_stack_push()
> g_stack_pop()
> g_stack_empty()
> g_stack_peek()
Let's add the following, just to make the stack more useful:
g_stack_shift() /* like pop(), only on the other end */
g_stack_unshift() /* like push(), only on the other end */
The problem is that these make the implementation more difficult.
If people don't want to add them to g_stack, that's not a big deal.
I'll be putting them in my bucketized array library. (which should
be a nice comprimise between GList and GArray).
Regards,
scottwimer
> is much better than:
>
> g_slist_prepend()
> g_slist_remove()
> if (slist == NULL)
> slist ? slist->data
>
>
> It's worth it just for the code readability.
> (though I would have used a GPtrArray.)
>
> I also think g_stack_index() is useful for a stack. Java stacks have a
> search() method.
>
> Damon
>
>
>
> --
> To unsubscribe: mail gtk-devel-list-request@redhat.com with
> "unsubscribe" as the Subject.
>
--
Scott Wimer
Play: scottw@cgibuilder.com www.cgibuilder.com
Work: scottw@corp.earthlink.net www.earthlink.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]