diff --git a/opal/class/opal_free_list.c b/opal/class/opal_free_list.c index 28a354c277..96d5100617 100644 --- a/opal/class/opal_free_list.c +++ b/opal/class/opal_free_list.c @@ -25,14 +25,13 @@ static void opal_free_list_construct(opal_free_list_t* fl); static void opal_free_list_destruct(opal_free_list_t* fl); - -opal_class_t opal_free_list_t_class = { - "opal_free_list_t", - OBJ_CLASS(opal_list_t), - (opal_construct_t)opal_free_list_construct, - (opal_destruct_t)opal_free_list_destruct -}; - +OBJ_CLASS_INSTANCE(opal_free_list_t, + opal_list_t, + opal_free_list_construct, + opal_free_list_destruct); +OBJ_CLASS_INSTANCE(opal_free_list_item_t, + opal_list_item_t, + NULL, NULL); static void opal_free_list_construct(opal_free_list_t* fl) { @@ -110,7 +109,6 @@ int opal_free_list_grow(opal_free_list_t* flist, size_t num_elements) for(i=0; iuser_data = NULL; if (NULL != flist->fl_elem_class) { OBJ_CONSTRUCT_INTERNAL(item, flist->fl_elem_class); } diff --git a/opal/class/opal_free_list.h b/opal/class/opal_free_list.h index 4c9224d015..75e60e7af6 100644 --- a/opal/class/opal_free_list.h +++ b/opal/class/opal_free_list.h @@ -29,8 +29,6 @@ #if defined(c_plusplus) || defined(__cplusplus) extern "C" { #endif -OMPI_DECLSPEC extern opal_class_t opal_free_list_t_class; - struct opal_free_list_t { @@ -46,13 +44,14 @@ struct opal_free_list_t opal_list_t fl_allocations; }; typedef struct opal_free_list_t opal_free_list_t; +OBJ_CLASS_DECLARATION(opal_free_list_t); struct opal_free_list_item_t { opal_list_item_t super; - void* user_data; }; typedef struct opal_free_list_item_t opal_free_list_item_t; +OBJ_CLASS_DECLARATION(opal_free_list_item_t); /** * Initialize a free list.