summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-04-24 21:44:35 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-04-24 21:44:35 (GMT)
commit9d84abe503267baaf3ddc675a4e3182d7f415be0 (patch)
treec8c6ad68accf6a903f20098b15565311d4b919fb /src
parent2deb953dbbde17712723529c4bca6a2bf3eedf6b (diff)
parent0fb5ce7ad50664f800ffe7e107e0fb0f90f66e12 (diff)
downloadhdf5-9d84abe503267baaf3ddc675a4e3182d7f415be0.zip
hdf5-9d84abe503267baaf3ddc675a4e3182d7f415be0.tar.gz
hdf5-9d84abe503267baaf3ddc675a4e3182d7f415be0.tar.bz2
Merge pull request #457 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '0fb5ce7ad50664f800ffe7e107e0fb0f90f66e12': Correct name of native function Fix javadoc Fix typo Signature change requires a ptr Change H5PLsize() signature Revert HDFFV-9655 Changed signature of H5PLgetsize Revert HDFFV-9655 by disabling test and not using new function. Fix path to actual executable location Windows ahs one more directory level
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
}