Movatterモバイル変換


[0]ホーム

URL:


D Logo
Menu
Search

Library Reference

version 2.110.0

overview

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 usinga local clone.

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.

Features

  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.

Authors:
Walter Bright
License:
Boost License 1.0

Sourcebackend/dlist.d

nothrow @nogc @safe list_tlist_next(list_tlist);
Returns:
pointer to next entry in list.
nothrow @nogc @trusted inout(void)*list_ptr(inout list_tlist);
Returns:
ptr from list entry.
nothrow @nogc @safe intlist_data(list_tlist);
Returns:
integer item from list entry.
nothrow @nogc @safe voidlist_prependdata(list_t*plist, intd);
Prepend integer item to list.
nothrow @nogc @trusted voidlist_free(list_t*plist, list_free_fpfreeptr);
Free list.
Parameters:
list_t*plistPointer to list to free
list_free_fpfreeptrPointer to freeing function for the data pointer (use FPNULL if none)

Output*plist is null

nothrow @nogc @trusted void*list_subtract(list_t*plist, void*ptr);
Remove ptr from the list pointed to by *plist.

Output*plist is updated to be the start of the new list

Returns:
null if *plist is null otherwise ptr
nothrow @nogc @safe void*list_pop(list_t*plist);
Remove first element in list pointed to by *plist.
Returns:
First element, null if *plist is null
nothrow @nogc @trusted list_tlist_append(list_t*plist, void*ptr);
Append ptr to *plist.
Returns:
pointer to list item created. null if out of memory
nothrow @nogc @trusted list_tlist_prepend(list_t*plist, void*ptr);
Prepend ptr to *plist.
Returns:
pointer to list item created (which is also the start of the list). null if out of memory
nothrow @nogc @safe intlist_nitems(list_tlist);
Count up and return number of items in list.
Returns:

of entries in list

nothrow @nogc @safe list_tlist_nth(list_tlist, intn);
Returns:
nth list entry in list.
nothrow @nogc @safe intlist_equal(list_tlist1, list_tlist2);
Compare two lists.
Returns:
If they have the same ptrs, return 1 else 0.
nothrow @nogc @trusted list_tlist_inlist(list_tlist, void*ptr);
Search for ptr in list.
Returns:
If found, return list entry that it is, else null.
nothrow @nogc @trusted voidlist_apply(list_t*plist, void function(void*) nothrow @nogcfp);
Apply a function fp to each member of a list.
nothrow @nogc @safe list_tlist_reverse(list_tl);
Reverse a list in place.
structListRange;
Range for Lists.
Copyright © 1999-2025 by theD Language Foundation | Page generated byDdoc on Mon Mar 31 23:30:56 2025

[8]ページ先頭

©2009-2025 Movatter.jp