]> git.ozlabs.org Git - ccan/commit
list: add list_for_each_rev_safe{,_off} macros
authorEric Wong <normalperson@yhbt.net>
Fri, 24 Oct 2014 22:02:32 +0000 (22:02 +0000)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 30 Mar 2015 06:46:33 +0000 (17:16 +1030)
commitc2fbfe5282ba264f3485586e7efa8a5967f2d386
treef79fdf8d32b27c8686c343803cff1f04e776fe46
parent79a88af5cf4b8cec81efa3a61a016cf0bd658c49
list: add list_for_each_rev_safe{,_off} macros

Deleting while iterating backwards will be needed in the
Ruby st_foreach_reverse_check implementation if we decide
to port Ruby's st.c to use ccan/list.

ref: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/65408

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/list/list.h
ccan/list/test/run.c