summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-04-24 20:10:58 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-04-24 20:10:58 (GMT)
commit6fac0de1582f9b8f9a85893cd269a86203b7fc41 (patch)
tree32646dc32eb602c3a06c64f390bba138f160ad0b /src
parentd9a69c592f384b9078e41a1affbf96d684074c2f (diff)
downloadhdf5-6fac0de1582f9b8f9a85893cd269a86203b7fc41.zip
hdf5-6fac0de1582f9b8f9a85893cd269a86203b7fc41.tar.gz
hdf5-6fac0de1582f9b8f9a85893cd269a86203b7fc41.tar.bz2
Revert HDFFV-9655 by disabling test and not using new function.
Diffstat (limited to 'src')
-rw-r--r--src/H5PL.c16
-rw-r--r--src/H5PLpublic.h12
2 files changed, 15 insertions, 13 deletions
diff --git a/src/H5PL.c b/src/H5PL.c
index 2789a5e..ba10e5a 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -720,17 +720,19 @@ done:
*
* Purpose: Query the size of the current list of plugin paths.
*
- * Return: Plugin path size (can't indicate failure due to unsigned type)
+ * Return: Plugin path size
*
*-------------------------------------------------------------------------
*/
-unsigned int
-H5PLsize(void)
+herr_t
+H5PLsize(unsigned int *listsize)
{
- unsigned int ret_value = (unsigned int)H5PL_num_paths_g;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE1("e", "*Iu", listsize);
- FUNC_ENTER_API(0)
- H5TRACE0("Iu","");
+ *listsize = (unsigned int)H5PL_num_paths_g;
done:
FUNC_LEAVE_API(ret_value)
@@ -778,7 +780,7 @@ H5PL__init_path_table(void)
/* Check for too many directories in path */
if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM)
HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table")
- if(NULL == (H5PL_path_table_g[H5PL_num_paths_g] = H5PL__env_strdup(dir)))
+ if(NULL == (H5PL_path_table_g[H5PL_num_paths_g] = H5MM_strdup(dir)))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
H5PL_num_paths_g++;
dir = HDstrtok(NULL, H5PL_PATH_SEPARATOR);
diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h
index 5e4dcae..12cdc87 100644
--- a/src/H5PLpublic.h
+++ b/src/H5PLpublic.h
@@ -43,14 +43,14 @@ extern "C" {
/* plugin state */
H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_type);
-H5_DLL herr_t H5PLget_loading_state(unsigned int* plugin_type/*out*/);
-H5_DLL herr_t H5PLappend(const char* plugin_path);
-H5_DLL herr_t H5PLprepend(const char* plugin_path);
-H5_DLL herr_t H5PLreplace(const char* plugin_path, unsigned int index);
-H5_DLL herr_t H5PLinsert(const char* plugin_path, unsigned int index);
+H5_DLL herr_t H5PLget_loading_state(unsigned int *plugin_type/*out*/);
+H5_DLL herr_t H5PLappend(const char *plugin_path);
+H5_DLL herr_t H5PLprepend(const char *plugin_path);
+H5_DLL herr_t H5PLreplace(const char *plugin_path, unsigned int index);
+H5_DLL herr_t H5PLinsert(const char *plugin_path, unsigned int index);
H5_DLL herr_t H5PLremove(unsigned int index);
H5_DLL ssize_t H5PLget(unsigned int index, char *pathname/*out*/, size_t size);
-H5_DLL unsigned int H5PLsize(void);
+H5_DLL herr_t H5PLsize(unsigned int *listsize/*out*/);
#ifdef __cplusplus
}