After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 585449 - [libgee] Singly linked list implementation
[libgee] Singly linked list implementation
Status: RESOLVED FIXED
Product: libgee
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: 0.7
Assigned To: Julien Fontanet
libgee-maint
Depends on:
Blocks: 589548
 
 
Reported: 2009-06-11 16:40 UTC by Julien Fontanet
Modified: 2011-12-19 10:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Gee.SList, a singly linked list implementation for libgee (7.67 KB, text/x-vala)
2009-06-11 16:42 UTC, Julien Fontanet
  Details
New version of Gee.SList (7.47 KB, text/plain)
2009-06-15 07:06 UTC, Julien Fontanet
  Details
The same code (with a little bug fix) + test file as a patch. (40.03 KB, patch)
2009-06-16 15:40 UTC, Julien Fontanet
none Details | Review
Minor fixes (1.03 KB, patch)
2009-06-19 20:44 UTC, Julien Fontanet
none Details | Review
New patch rebased against git master (28.27 KB, patch)
2009-07-23 12:17 UTC, Julien Fontanet
none Details | Review
add now appends instead of prepends. (32.70 KB, patch)
2009-07-23 12:18 UTC, Julien Fontanet
none Details | Review
New method: prepend + various cleanups (4.01 KB, patch)
2009-07-23 13:24 UTC, Julien Fontanet
none Details | Review
Little optimization in SinglyLinkedList.slice. (1022 bytes, patch)
2009-07-23 18:00 UTC, Julien Fontanet
none Details | Review
Various improvements in SinglyLinkedList. (7.90 KB, patch)
2009-07-23 18:01 UTC, Julien Fontanet
none Details | Review
Various improvements in SinglyLinkedList. (7.90 KB, patch)
2009-07-23 18:08 UTC, Julien Fontanet
none Details | Review
Original version of my singly linked implementation. (8.79 KB, application/octet-stream)
2011-04-06 13:56 UTC, Julien Fontanet
  Details

Description Julien Fontanet 2009-06-11 16:40:31 UTC
libgee should have a singly linked list implementation similar to SList in GLib.
Comment 1 Julien Fontanet 2009-06-11 16:42:29 UTC
Created attachment 136341 [details]
Gee.SList, a singly linked list implementation for libgee
Comment 2 Julien Fontanet 2009-06-15 07:06:28 UTC
Created attachment 136604 [details]
New version of Gee.SList

Code cleanup.
Comment 3 Julien Fontanet 2009-06-16 15:40:35 UTC
Created attachment 136738 [details] [review]
The same code (with a little bug fix) + test file as a patch.

This patch depends on this one Attachment #136640 [details].
Comment 4 Julien Fontanet 2009-06-19 20:44:57 UTC
Created attachment 137032 [details] [review]
Minor fixes

My own libgee repository is visible here: http://git.isonoe.net/libgee/
Comment 5 Didier "Ptitjes" 2009-07-23 09:13:50 UTC
OK. So we will call this implementation SinglyLinkedList. (Rational is doubly version is used most of the time, so the doubly implementation is simply named LinkedList)

Also as discussed on IRC, a _tail private member has to be added, and the add() method made to append at the end of the list and not insert at the begining.
Comment 6 Julien Fontanet 2009-07-23 12:17:00 UTC
Created attachment 139066 [details] [review]
New patch rebased against git master
Comment 7 Julien Fontanet 2009-07-23 12:18:33 UTC
Created attachment 139067 [details] [review]
add now appends instead of prepends.

The _tail field will also be useful for the Queue interface.
Comment 8 Julien Fontanet 2009-07-23 13:24:48 UTC
Created attachment 139075 [details] [review]
New method: prepend + various cleanups
Comment 9 Julien Fontanet 2009-07-23 18:00:05 UTC
Created attachment 139093 [details] [review]
Little optimization in SinglyLinkedList.slice.
Comment 10 Julien Fontanet 2009-07-23 18:01:42 UTC
Created attachment 139094 [details] [review]
Various improvements in SinglyLinkedList.

- Doc for non inherited methods.
- Code optimization in SinglyLinkedList.Iterator.next.
- Various cleanups.
Comment 11 Julien Fontanet 2009-07-23 18:08:42 UTC
Created attachment 139096 [details] [review]
Various improvements in SinglyLinkedList.

- Doc for non inherited methods.
- Code optimization in SinglyLinkedList.Iterator.next.
- Various cleanups.
Comment 12 Julien Fontanet 2009-07-24 07:20:28 UTC
Well, instead of sending endlessly patches, I am giving you the URL of my own branch of libgee which is based on the last git master: http://git.isonoe.net/gnome/libgee/?h=julien
Comment 13 Didier "Ptitjes" 2009-09-26 16:03:19 UTC
Could we reuse that code to implement a unbounded lock-free queue ? (using AtomicPointer)
Comment 14 Maciej (Matthew) Piechotka 2011-04-05 06:51:51 UTC
The code is no longer accessable however I've done some work on lock-free lists. I hope other lock-free structures will follow.
Comment 15 Julien Fontanet 2011-04-06 13:56:05 UTC
Created attachment 185308 [details]
Original version of my singly linked implementation.

I found my old implementation of SinglyLinkedList, it is unlikely that it will compiles against recent version of Vala/libGee.

I don't suppose anyone will be interrested in it but we never know :)
Comment 16 Maciej (Matthew) Piechotka 2011-12-19 10:26:10 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.