Use of complete GList functionality? Change to GSList?
Derek Atkins
warlord@MIT.EDU
04 Mar 2001 09:47:14 -0500
Hi,
I was wondering if we're really using GList's full functionality
everywhere, and if not, if we could switch those places to a GSList?
I'm currently working on an RPC Backend storage system for Gnucash.
One of the "problems" is that I basically have to completely copy the
data structures. That alone isn't so bad, but I'd like to try to make
the RPC structures match the 'normal' structures, so I don't have to
perform an alloc/copy/free for every RPC operation.
The problem is that while RPC can handle a linked list, at cannot
handle a doubly-linked list. Therefore, anything that is using a
GList just plain loses in terms of building an RPC structure that
matches. If, however, we used GSLists, then I could easily build an
RPC equivalent.
I've looked through the code, and the strng "->prev" is only used in a
few places. I haven't looked closely yet to see how it is being used.
But I wanted to find out if there were objections to basically doing a
global-replace of GList -> GSList (except in the cases where the
double-linking is actually being used). A corollary question is:
where is the double-linking actually being used?
Thanks,
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord@MIT.EDU PGP key available