[ccan] [PATCH] heap: new module

Rusty Russell rusty at rustcorp.com.au
Tue Sep 10 15:08:11 EST 2013


"Emilio G. Cota" <cota at braap.org> writes:
> From: "Emilio G. Cota" <cota at braap.org>
>
> Signed-off-by: Emilio G. Cota <cota at braap.org>

Thanks, applied!

Please provide your ssh key so I can give you permission to update the
ccan/heap dir.

You might also want an example using heap->len, since it's probably
required for safe usage in general, eg under heap_peek:

Example:
        // Safe wrapper: returns NULL if heap empty
        static inline void *heap_top(const struct heap *h)
        {
                return h->num ? heap_peek(h) : NULL;
        }

Cheers,
Rusty.


More information about the ccan mailing list