[Multipart nttrans replies 1/3] Add DLIST_FIND and DLIST_FOREACH macros

Sam Liddicott sam at liddicott.com
Fri Jul 4 10:05:24 GMT 2008


DLIST_FIND(list, result, test-expression)
puts the first match in result, or NULL if nothing matches.

DLIST_FOREACH(list, result, expression)
evaluates expression on each member, using result as
a temporary variable.

In each case result must be declared of the type of a list member

Signed-off-by: Sam Liddicott <sam at liddicott.com>
---
 source/lib/util/dlinklist.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: f37dc58a3e50f1bfe6118d30134088afde59d1ea.diff
Type: text/x-patch
Size: 821 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080704/6ae1e340/f37dc58a3e50f1bfe6118d30134088afde59d1ea.bin


More information about the samba-technical mailing list