View source code
Display the source code in dmd/backend/dlist.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module dmd.backend.dlist

Interface to the C linked list type.

List is a complete package of functions to deal with singly linked lists of pointers or integers.


1. Uses mem package. 2. Has loop-back tests. 3. Each item in the list can have multiple predecessors, enabling different lists to 'share' a common tail.


list_append(plist, ptr) Append ptr to *plist.
list_apply(plist, fp) Apply a function fp to each member of a list.
list_equal(list1, list2) Compare two lists.
list_free(plist, freeptr) Free list.
list_inlist(list, ptr) Search for ptr in list.
list_nitems(list) Count up and return number of items in list.
list_nth(list, n)
list_pop(plist) Remove first element in list pointed to by *plist.
list_prepend(plist, ptr) Prepend ptr to *plist.
list_prependdata(plist, d) Prepend integer item to list.
list_reverse(l) Reverse a list in place.
list_subtract(plist, ptr) Remove ptr from the list pointed to by *plist.


ListRange Range for Lists.


Walter Bright


Boost License 1.0