From 02b539a8876795a0fb9cb747e297eb825a2b2747 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 2 Feb 2010 20:14:54 -0800 Subject: [PATCH] llx: New macro LLX_INITIALIZER to initialize an llx list statically. --- src/libpspp/llx.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libpspp/llx.h b/src/libpspp/llx.h index 6232f396..23c3bdaf 100644 --- a/src/libpspp/llx.h +++ b/src/libpspp/llx.h @@ -110,6 +110,12 @@ struct llx_list struct ll_list ll_list; /* The list. */ }; +/* Suitable for use as the initializer for a `struct llx_list' + named LIST. Typical usage: + struct llx_list list = LLX_INITIALIZER (list); + LLX_INITIALIZER() is an alternative to llx_init(). */ +#define LLX_INITIALIZER(LIST) { LL_INITIALIZER ((LIST).ll_list) } + /* Memory manager. */ struct llx_manager { -- 2.30.2