mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
Add operations to get the first and last entry in the tree, respectively. Searching for 0 or ~UINT64_C(0) is not sufficient in the presence of duplicated keys, and is more inefficient anyway. rb_first() followed by rb_next() until NULL, or equivalently rb_last() followed by rb_prev() until NULL, can be used to walk the tree in key order (ascending or descending), including all duplicate key entries. Since this is a *threaded* tree now, this walk can safely free entires as it goes along, as long as the whole tree is destroyed; once any one entry has been freed, the tree is no longer valid for anything other than proceeding with the same tree walk. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> |
||
|---|---|---|
| .. | ||
| bytesex.h | ||
| compiler.h | ||
| disp8.h | ||
| error.h | ||
| hashtbl.h | ||
| iflag.h | ||
| ilog2.h | ||
| insns.h | ||
| labels.h | ||
| md5.h | ||
| nasm.h | ||
| nasmint.h | ||
| nasmlib.h | ||
| nctype.h | ||
| opflags.h | ||
| perfhash.h | ||
| raa.h | ||
| rbtree.h | ||
| rdoff.h | ||
| saa.h | ||
| strlist.h | ||
| tables.h | ||
| ver.h | ||