diff options
Diffstat (limited to 'src/H5PL.c')
-rw-r--r-- | src/H5PL.c | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -130,9 +130,9 @@ static herr_t H5PL__close(H5PL_HANDLE handle); /*******************/ /* Table for opened plugin libraries */ -static size_t H5PL_table_alloc_g = 0; -static size_t H5PL_table_used_g = 0; -static H5PL_table_t *H5PL_table_g = NULL; +static size_t H5PL_filter_table_alloc_g = 0; +static size_t H5PL_filter_table_used_g = 0; +static H5PL_table_t *H5PL_filter_table_g = NULL; /* Table for opened vol plugin libraries */ static size_t H5PL_vol_table_alloc_g = 0; @@ -235,8 +235,8 @@ H5PL_term_interface(void) size_t u; /* Local index variable */ /* Close opened dynamic libraries */ - for(u = 0; u < H5PL_table_used_g; u++) - H5PL__close((H5PL_table_g[u]).handle); + for(u = 0; u < H5PL_filter_table_used_g; u++) + H5PL__close((H5PL_filter_table_g[u]).handle); /* Close opened dynamic vol libraries */ for(u = 0; u < H5PL_vol_table_used_g; u++) { @@ -245,8 +245,8 @@ H5PL_term_interface(void) } /* Free the table of dynamic libraries */ - H5PL_table_g = (H5PL_table_t *)H5MM_xfree(H5PL_table_g); - H5PL_table_used_g = H5PL_table_alloc_g = 0; + H5PL_filter_table_g = (H5PL_table_t *)H5MM_xfree(H5PL_filter_table_g); + H5PL_filter_table_used_g = H5PL_filter_table_alloc_g = 0; /* Free the table of dynamic vol libraries */ H5PL_vol_table_g = (H5PL_table_t *)H5MM_xfree(H5PL_vol_table_g); @@ -580,21 +580,21 @@ H5PL__open(H5PL_type_t pl_type, char *libname, int pl_id, const char *pl_name, c /* Successfully found plugin library, check if it's the right one */ if(plugin_info->id == pl_id) { /* Expand the table if it is too small */ - if(H5PL_table_used_g >= H5PL_table_alloc_g) { - size_t n = MAX(H5Z_MAX_NFILTERS, 2 * H5PL_table_alloc_g); - H5PL_table_t *table = (H5PL_table_t *)H5MM_realloc(H5PL_table_g, n * sizeof(H5PL_table_t)); + if(H5PL_filter_table_used_g >= H5PL_filter_table_alloc_g) { + size_t n = MAX(H5Z_MAX_NFILTERS, 2 * H5PL_filter_table_alloc_g); + H5PL_table_t *table = (H5PL_table_t *)H5MM_realloc(H5PL_filter_table_g, n * sizeof(H5PL_table_t)); if(!table) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "unable to extend dynamic library table") - H5PL_table_g = table; - H5PL_table_alloc_g = n; + H5PL_filter_table_g = table; + H5PL_filter_table_alloc_g = n; } /* end if */ - (H5PL_table_g[H5PL_table_used_g]).handle = handle; - (H5PL_table_g[H5PL_table_used_g]).pl_type = pl_type; - (H5PL_table_g[H5PL_table_used_g]).pl_id = plugin_info->id; - H5PL_table_used_g++; + (H5PL_filter_table_g[H5PL_filter_table_used_g]).handle = handle; + (H5PL_filter_table_g[H5PL_filter_table_used_g]).pl_type = pl_type; + (H5PL_filter_table_g[H5PL_filter_table_used_g]).pl_id = plugin_info->id; + H5PL_filter_table_used_g++; /* Set the plugin info to return */ *pl_info = (const void *)plugin_info; @@ -696,15 +696,15 @@ H5PL__search_table(H5PL_type_t plugin_type, int type_id, const char *plugin_name FUNC_ENTER_STATIC /* Search in the table of already opened dynamic libraries */ - if(H5PL_TYPE_FILTER == plugin_type && H5PL_table_used_g > 0) { + if(H5PL_TYPE_FILTER == plugin_type && H5PL_filter_table_used_g > 0) { size_t i; - for(i = 0; i < H5PL_table_used_g; i++) { - if((plugin_type == (H5PL_table_g[i]).pl_type) && (type_id == (H5PL_table_g[i]).pl_id)) { + for(i = 0; i < H5PL_filter_table_used_g; i++) { + if((plugin_type == (H5PL_filter_table_g[i]).pl_type) && (type_id == (H5PL_filter_table_g[i]).pl_id)) { H5PL_get_plugin_info_t get_plugin_info; const H5Z_class2_t *plugin_info; - if(NULL == (get_plugin_info = (H5PL_get_plugin_info_t)H5PL_GET_LIB_FUNC((H5PL_table_g[i]).handle, "H5PLget_plugin_info"))) + if(NULL == (get_plugin_info = (H5PL_get_plugin_info_t)H5PL_GET_LIB_FUNC((H5PL_filter_table_g[i]).handle, "H5PLget_plugin_info"))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get function for H5PLget_plugin_info") if(NULL == (plugin_info = (const H5Z_class2_t *)(*get_plugin_info)())) |