[PATCH] Add DECLARE_INST_LIST() macro

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1200494010 28800 # Node ID ef0dd32ef7faf101f97acfa0f0268bf18c22dcac # Parent 2948ecbed2674aee61a994b06468c2ce9c763bb3 Add DECLARE_INST_LIST() macro to allow declarations of pre-initialized inst_list structures Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 2948ecbed267 -r ef0dd32ef7fa libcmpiutil.h --- a/libcmpiutil.h Tue Jan 15 12:54:04 2008 +0100 +++ b/libcmpiutil.h Wed Jan 16 06:33:30 2008 -0800 @@ -366,6 +366,13 @@ void inst_list_free(struct inst_list *li * @returns nonzero on success, zero on failure */ int inst_list_add(struct inst_list *list, CMPIInstance *inst); + +/** + * Define a pre-initialized inst_list + * + * @param x The variable name for the list. + */ +#define DECLARE_INST_LIST(x) struct inst_list x = {NULL, 0, 0}; /** * Compare key values in a reference to properties in an instance,

Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1200494010 28800 # Node ID ef0dd32ef7faf101f97acfa0f0268bf18c22dcac # Parent 2948ecbed2674aee61a994b06468c2ce9c763bb3 Add DECLARE_INST_LIST() macro to allow declarations of pre-initialized inst_list structures
I think this is a useful addition. +1 -- Kaitlin Rupert IBM Linux Technology Center karupert@us.ibm.com

Kaitlin Rupert wrote:
Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1200494010 28800 # Node ID ef0dd32ef7faf101f97acfa0f0268bf18c22dcac # Parent 2948ecbed2674aee61a994b06468c2ce9c763bb3 Add DECLARE_INST_LIST() macro to allow declarations of pre-initialized inst_list structures
I think this is a useful addition. +1
I agree. Thanks. +1 -- Regards Heidi Eckhart Software Engineer IBM Linux Technology Center - Open Hypervisor
participants (3)
-
Dan Smith
-
Heidi Eckhart
-
Kaitlin Rupert