Re: [gimp-devel] patches available
- From: Owen Taylor <owt1 cornell edu>
- To: leavittl byu edu
- cc: gimp-developer scam xcf berkeley edu, gtk-list redhat com
- Subject: Re: [gimp-devel] patches available
- Date: Thu, 15 Jan 1998 21:14:43 -0500
[ This is really a subject for gtk-list, not gimp-developer ]
> I have added some g_stack routines to glib.
> If anybody is interested, you can look at
>
> http://students.cs.byu.edu/~leavittl/gimp
>
> the files are
>
> gstack.c
> testglib.stack.patch.1
> glib.stack.patch.3
>
> yanele
g_stack_push => g_slist_prepend
g_stack_pop =>
result = slist->data;
tmp_list = slist;
slist = slist->next;
g_list_free_1 (tmp_list);
(Well, actually, if you were coding a general function, you would
probably check to see if slist was NULL, first)
I don't think you can get any more efficient than that
with a special Stack class. (Not that it might not be
interesting to write one...)
I suppose we could add g_(s)list_pop to do the above,
if people consider it needed. It would have to return
the result in parameter.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]