From: Ben Pfaff Date: Wed, 3 Feb 2010 04:14:54 +0000 (-0800) Subject: llx: New macro LLX_INITIALIZER to initialize an llx list statically. X-Git-Tag: v0.7.4~21 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02b539a8876795a0fb9cb747e297eb825a2b2747;p=pspp-builds.git llx: New macro LLX_INITIALIZER to initialize an llx list statically. --- 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 {