summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-04-24 21:14:53 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-05-11 14:33:06 (GMT)
commit724538ad54e512d788ccbd99c8501667784e26b2 (patch)
treec440833831d210ac3d873ac59f89eadc97c783b4 /src
parenta0e70a248e5e4de34ba2470654b3e220614970e3 (diff)
downloadhdf5-724538ad54e512d788ccbd99c8501667784e26b2.zip
hdf5-724538ad54e512d788ccbd99c8501667784e26b2.tar.gz
hdf5-724538ad54e512d788ccbd99c8501667784e26b2.tar.bz2
Change the signature of H5PLget_size function
Diffstat (limited to 'src')
-rw-r--r--src/H5PL.c20
-rw-r--r--src/H5PLpublic.h12
2 files changed, 20 insertions, 12 deletions
diff --git a/src/H5PL.c b/src/H5PL.c
index e786742..1478c3e 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -600,7 +600,7 @@ ssize_t
H5PLget(unsigned int index, char *pathname/*out*/, size_t size)
{
ssize_t ret_value = 0; /* Return value */
- ssize_t len = 0; /* Length of pathname */
+ size_t len = 0; /* Length of pathname */
char *dl_path = NULL;
FUNC_ENTER_API(FAIL)
@@ -619,7 +619,7 @@ H5PLget(unsigned int index, char *pathname/*out*/, size_t size)
} /* end if */
/* Set return value */
- ret_value = len;
+ ret_value = (ssize_t)len;
done:
FUNC_LEAVE_API(ret_value)
@@ -631,14 +631,22 @@ done:
*
* Purpose: Query the size of the current list of plugin paths.
*
- * Return: Non-negative or success.
+ * Return: Plugin path size
*
*-------------------------------------------------------------------------
*/
-unsigned int
-H5PLsize(void)
+herr_t
+H5PLsize(unsigned int *listsize)
{
- return (unsigned int)H5PL_num_paths_g;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE1("e", "*Iu", listsize);
+
+ *listsize = (unsigned int)H5PL_num_paths_g;
+
+done:
+ FUNC_LEAVE_API(ret_value)
} /* end H5PLsize() */
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
}