summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Ddeprec.c13
-rw-r--r--src/H5Dpublic.h2
-rw-r--r--src/H5O.c4
-rw-r--r--src/H5public.h6
-rw-r--r--src/H5vers.txt1
-rw-r--r--src/H5version.h15
6 files changed, 29 insertions, 12 deletions
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index 3d58557..465ac41 100644
--- a/src/H5Ddeprec.c
+++ b/src/H5Ddeprec.c
@@ -180,16 +180,18 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Dcreate() */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
- * Function: H5Dopen
+ * Function: H5Dopen1
*
* Purpose: Finds a dataset named NAME at LOC_ID, opens it, and returns
* its ID. The dataset should be close when the caller is no
* longer interested in it.
*
- * Return: Success: A new dataset ID
+ * Note: Deprecated in favor of H5Dopen2
*
+ * Return: Success: A new dataset ID
* Failure: FAIL
*
* Programmer: Robb Matzke
@@ -198,7 +200,7 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-H5Dopen(hid_t loc_id, const char *name)
+H5Dopen1(hid_t loc_id, const char *name)
{
H5D_t *dset = NULL;
H5G_loc_t loc; /* Object location of group */
@@ -210,7 +212,7 @@ H5Dopen(hid_t loc_id, const char *name)
hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datset */
hid_t ret_value;
- FUNC_ENTER_API(H5Dopen, FAIL)
+ FUNC_ENTER_API(H5Dopen1, FAIL)
H5TRACE2("i", "i*s", loc_id, name);
/* Check args */
@@ -256,9 +258,8 @@ done:
} /* end if */
FUNC_LEAVE_API(ret_value)
-} /* end H5Dopen() */
+} /* end H5Dopen1() */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
* Function: H5Dextend
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index bbd74a6..be858ac 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -123,7 +123,6 @@ H5_DLL herr_t H5Ddebug(hid_t dset_id);
*/
H5_DLL hid_t H5Dcreate(hid_t file_id, const char *name, hid_t type_id,
hid_t space_id, hid_t plist_id);
-H5_DLL hid_t H5Dopen(hid_t file_id, const char *name);
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
@@ -138,6 +137,7 @@ H5_DLL hid_t H5Dopen(hid_t file_id, const char *name);
/* Function prototypes */
+H5_DLL hid_t H5Dopen1(hid_t file_id, const char *name);
H5_DLL herr_t H5Dextend(hid_t dset_id, const hsize_t *size);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5O.c b/src/H5O.c
index 1122e45..5711140 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -176,8 +176,8 @@ H5O_init_interface(void)
*
* Purpose: Opens an object within an HDF5 file.
*
- * This function opens an object in the same way that H5Gopen,
- * H5Topen, and H5Dopen do. However, H5Oopen doesn't require
+ * This function opens an object in the same way that H5Gopen2,
+ * H5Topen2, and H5Dopen2 do. However, H5Oopen doesn't require
* the type of object to be known beforehand. This can be
* useful in user-defined links, for instance, when only a
* path is known.
diff --git a/src/H5public.h b/src/H5public.h
index 00ca6ab..b07cb22 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -86,9 +86,8 @@ extern "C" {
* The negative failure value is most commonly -1, but don't bet on it. The
* proper way to detect failure is something like:
*
- * if ((dset = H5Dopen (file, name))<0) {
- * fprintf (stderr, "unable to open the requested dataset\n");
- * }
+ * if((dset = H5Dopen2(file, name)) < 0)
+ * fprintf(stderr, "unable to open the requested dataset\n");
*/
typedef int herr_t;
@@ -319,3 +318,4 @@ H5_DLL herr_t H5check_version(unsigned majnum, unsigned minnum,
}
#endif
#endif
+
diff --git a/src/H5vers.txt b/src/H5vers.txt
index 8d4b6f9..39f27e4 100644
--- a/src/H5vers.txt
+++ b/src/H5vers.txt
@@ -49,6 +49,7 @@ FUNCTION: H5Acreate; ; v10, v18
FUNCTION: H5Adelete; ; v10, v18
FUNCTION: H5Aiterate; H5A_operator; v10, v18
FUNCTION: H5Arename; ; v16, v18
+FUNCTION: H5Dopen; ; v10, v18
FUNCTION: H5Eclear; ; v10, v18
FUNCTION: H5Eget_auto; ; v10, v18
FUNCTION: H5Eprint; ; v10, v18
diff --git a/src/H5version.h b/src/H5version.h
index 25efa53..5573e5b 100644
--- a/src/H5version.h
+++ b/src/H5version.h
@@ -54,6 +54,10 @@
#define H5Arename_vers 1
#endif /* !defined(H5Arename_vers) */
+#if !defined(H5Dopen_vers)
+#define H5Dopen_vers 1
+#endif /* !defined(H5Dopen_vers) */
+
#if !defined(H5Eclear_vers)
#define H5Eclear_vers 1
#endif /* !defined(H5Eclear_vers) */
@@ -165,6 +169,17 @@
#error "H5Arename_vers set to invalid value"
#endif /* H5Arename_vers */
+#if !defined(H5Dopen_vers) || H5Dopen_vers == 2
+#ifndef H5Dopen_vers
+#define H5Dopen_vers 2
+#endif /* H5Dopen_vers */
+#define H5Dopen H5Dopen2
+#elif H5Dopen_vers == 1
+#define H5Dopen H5Dopen1
+#else /* H5Dopen_vers */
+#error "H5Dopen_vers set to invalid value"
+#endif /* H5Dopen_vers */
+
#if !defined(H5Eclear_vers) || H5Eclear_vers == 2
#ifndef H5Eclear_vers
#define H5Eclear_vers 2