summaryrefslogtreecommitdiff
path: root/ccan/foreach
AgeCommit message (Collapse)Author
2013-02-07foreach: fix overzealous test.Rusty Russell
Andreas Schlick reported a failure on 64-bit systems; we should simply test that the number of iterators does not grow on second iteration, rather than assuming an explicit limit as compilers may vary. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-10-31foreach: remove unused var warning.Rusty Russell
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-10-04foreach: make test more accurate, fix for 64-bit gcc 4.4.3Rusty Russell
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 on x86_64 uses a different stack offset for the second call to test_ptr_recursion(), meaning it sees new iterators. Put it inside a loop to reduce the chance of that happening.
2011-07-21various: add LICENSE comments.Rusty Russell
2011-07-19various: make the _info License: wording uniform for GPL variants.Rusty Russell
GPL versions 2 and 3 both specifically mention "any later version" as the phrase which allows the user to choose to upgrade the license. Make sure we use that phrase, and make the format consistent across modules.
2011-03-22foreach: more const iteration fixes.Rusty Russell
Shown up by -Wwrite-strings.
2011-03-21foreach: fix case where iterators are not on the stack.Rusty Russell
The foreach garbage collection assumed that iterators were all on the stack, but they could be on the heap or a global (or static) variable. We can prevent the heap case by tricky use of macros to complain on any iterator which isn't a single token, but we can't prevent globals/statics. So, if an iterator already seems to be "off" the stack, mark it as such and simply never free it.
2011-03-21foreach: allow a single argument to foreach_int() and foreach_ptr().Rusty Russell
David Gibson noted that foreach requires more than one argument. There's no particularly good reason for this, other than lack of imagination on my part.
2011-03-21foreach: fix HAVE_FOR_LOOP_DECLARATION case.Rusty Russell
2010-11-10foreach, iscsi, jbitset, jmap, opt, rbtree, sparse_bsearch, tally, tdb2: add ↵Rusty Russell
LICENSE symlinks
2010-11-04antithread, foreach, grab_file, hashtable, str_talloc: fix _info depends.Rusty Russell
For str_talloc and grab_file, avoid using ccan/str (it's just for tests).
2010-11-02foreach: new moduleRusty Russell