From: David Gibson Date: Sat, 13 Jun 2015 14:23:39 +0000 (+1000) Subject: lstack: Allow a stack to be initialized from an existing top element X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=d448f12d07c5b65d5db29f207de3178490f8360d;hp=d448f12d07c5b65d5db29f207de3178490f8360d;p=ccan lstack: Allow a stack to be initialized from an existing top element There are occasional cases where you might construct a valid stack, and retain a direct pointer to the top element, but not the struct lstack used to build it. This patch adds a new lstack_init_from_top() macro to reconstruct a valid struct lstack from the element pointer for cases like this. Signed-off-by: David Gibson ---