- 13 Apr, 2015 1 commit
-
-
Delio Brignoli authored
Hi Rusty, Thanks for reviewing the patch. V2 is attached, see my comments below. > On 31 Mar 2015, at 02:36, Rusty Russell <rusty@rustcorp.com.au> wrote: > > Delio Brignoli <brignoli.delio@gmail.com> writes: >> Hi All, >> >> tal_stack implements a (trivial) stack of tal contexts. Would this be a worthy addition to CCAN? (not necessarily in its current form). […] > This is cute; I’ve seen similar used in Samba. It's Indeed, it was inspired by talloc_stack.h ;-) […] > You are missing a _info file: I would create that, and put your example > in an Example: section there. I moved the module and tests under can/tal/stack and added a LICENSE and _info. > Other random advice: > 1) You should also document the tal_newframe function (particularly note > that you're expected to tal_free the result, and that it will free > any future unfreed frames). And note that it’s not threadsafe. Done. > 2) You probably want tal_newframe to be a macro, and hand file and line > thought to the tal_alloc_ call. That makes debugging nicer when > you iterate the tree. Done. The macro is calling a tal_newframe_() function because I’d rather not make the module’s stack variable ‘public’. > 3) Consider whether you want to declare a dummy type 'struct tal_stack'. > Probably pretty unnecessary since it’s quite clear. Skipped this one. We can declare it later if we change our minds. Thanks — Delio From c2ceb9258d97b0dcb72e7b6986cfd2bd394b254e Mon Sep 17 00:00:00 2001 From: Delio Brignoli <dbrignoli@audioscience.com> Date: Sun, 15 Mar 2015 13:26:40 +0100 Subject: [PATCH] tal_stack: new module - V2 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 10 Apr, 2015 1 commit
-
-
Peter Barker authored
In the case that the objects built but linking failed, module_builds.c called score_file_error with a NULL ccan_file object and 0 for line number. score_file_error assumed that the ccan_file object it is passed was not-NULL when appending file errors to the score's aggregate error string. It attempted to dereference it to get "fullname". score_error was factored out from score_file_error. It takes a "source" parameter, which is the file's full name (and possibly line number) in the score_file_error case, and the ccan module name in the case of link failure.
-
- 30 Mar, 2015 12 commits
-
-
Peter Barker authored
Encode buffers into base64 according to rfc4648. Decode base64-encoded buffers according to the same standard. Signed-off-by: <pb-ccan@barker.dropbear.id.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Peter Barker authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Eric Wong authored
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/65408Signed-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>
-
Eric Wong authored
And re-implement list_for_each_rev in terms of list_for_each_rev_off to avoid duplicating iteration logic. 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>
-
Eric Wong authored
These internal iteration macros will make implementing reverse iteration simpler. For now, reimplement existing list_for_each_off and list_for_each_safe_off macros on top of these macros to prove they pass existing tests. 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>
-
Eric Wong authored
This allows deleting and re-inserting an element in place of the deleted element without branching. 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>
-
Eric Wong authored
These make it easy to add a new element before or after an existing element in the middle of the list. The existing list_add and list_add_tail functions are trivially reimplemented on top of these new functions. 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>
-
Rusty Russell authored
It's a test dependency, not a core one, so it belongs under "testdepends". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Jeremy Kerr authored
Commit 9e2c88b5 added an extra return (with an unconditional byteswap) in cpu_to_be64. This breaks on big-endian, where we shouldn't be byteswapping. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Stuart Longland authored
This is a small couple of functions for joining lists of strings together. The lists can either be varadic arguments or arrays, and delimiters are optional. This patch incorporates some advice from David Gibson on the original module.
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 20 Mar, 2015 3 commits
-
-
Rusty Russell authored
Mainly include path fixes. Also Samba's unit tests were enhanced to detect the prefixes helpapi and helprun to indicate an object was to be linked against only api/run tests. We hack around that by #including the helper code instead. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
It was missing dependency information, and a description of ntdb. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 18 Mar, 2015 2 commits
-
-
Rusty Russell authored
The other option would be to require Python.h, which seems overkill. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 17 Mar, 2015 1 commit
-
-
- 16 Mar, 2015 5 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
David Disseldorp authored
The Authors entries were added based on source file copyright statements. Full details can be found via the upstream Samba Git repository. Signed-off-by: David Disseldorp <ddiss@suse.de>
-
David Disseldorp authored
Signed-off-by: David Disseldorp <ddiss@suse.de>
-
David Disseldorp authored
As part of Samba, ntdb was built using the Waf build system. As part of ccan, convert this to a simple Makefile, and add a static config.h. The Makefile only builds core ntdb components for now - libntdb and tools. Signed-off-by: David Disseldorp <ddiss@suse.de>
-
David Disseldorp authored
ntdb is a partial rewrite of Samba's Trivial Database, providing > 4GB database scalability and an improved API. Obtained from the Samba repository at git://git.samba.org/samba.git, as of bd13405e8570e9a5942165a8c52a2bc3fdc9d96e. See Samba's Git changelog for authorship details. Signed-off-by: David Disseldorp <ddiss@suse.de>
-
- 15 Mar, 2015 3 commits
-
-
Rusty Russell authored
Kalle shows the superiority of 3 (as does the paper for > 50 buckets). https://github.com/kallerosenbaum/bitcoin-iblt/wiki/Diff-count-VS-failure-probabilitySigned-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 14 Nov, 2014 4 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
This lets you annotate your headers with notes for cdump. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
We can now parse array sizes properly: comments and extra [] pairs will no longer confuse us. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 11 Nov, 2014 5 commits
-
-
Rusty Russell authored
This was found because ccanlint now looks for examples here too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 10 Nov, 2014 2 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
pushpull module doesn't have examples in pushpull.h. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 07 Nov, 2014 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-