From af4d79cbb6ab621414f5c72366dadc7910e7402a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 30 Mar 2017 13:22:43 -0500 Subject: HDFFV-10143 change put to replace and add const --- src/H5PL.c | 12 ++++++------ src/H5PLpublic.h | 8 ++++---- test/plugin.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index abd3ea2..4bf19fc 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -417,7 +417,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLappend(char* plugin_path) +H5PLappend(const char* plugin_path) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -455,7 +455,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLprepend(char* plugin_path) +H5PLprepend(const char* plugin_path) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -487,7 +487,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5PLput + * Function: H5PLreplace * * Purpose: Replace the path at the specified index. * @@ -496,7 +496,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLput(char* plugin_path, unsigned int index) +H5PLreplace(const char* plugin_path, unsigned int index) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; @@ -520,7 +520,7 @@ done: dl_path = (char *)H5MM_xfree(dl_path); FUNC_LEAVE_API(ret_value) -} /* end H5PLput() */ +} /* end H5PLreplace() */ /*------------------------------------------------------------------------- @@ -533,7 +533,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5PLinsert(char* plugin_path, unsigned int index) +H5PLinsert(const char* plugin_path, unsigned int index) { herr_t ret_value = SUCCEED; /* Return value */ char *dl_path = NULL; diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index f3fe497..ca46542 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -44,10 +44,10 @@ 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(char* plugin_path); -H5_DLL herr_t H5PLprepend(char* plugin_path); -H5_DLL herr_t H5PLput(char* plugin_path, unsigned int index); -H5_DLL herr_t H5PLinsert(char* plugin_path, unsigned int index); +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 const char* H5PLget(unsigned int index); H5_DLL unsigned int H5PLsize(void); diff --git a/test/plugin.c b/test/plugin.c index c739b72..359bbdd 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -876,7 +876,7 @@ test_filter_path_apis(void) TESTING(" replace"); /* Replace one path*/ HDsprintf(pathname, "a_path_%d", 20); - if (H5PLput(pathname, 1) < 0) { + if (H5PLreplace(pathname, 1) < 0) { HDfprintf(stderr," replace 1: %s\n", pathname); TEST_ERROR } -- cgit v0.12