summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-09-27 22:42:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-09-27 22:42:20 (GMT)
commitc63f9b42ec89ff649f4f086e2f422fa01d9967b1 (patch)
tree563d292a805c97be9136799016215ea99af39452 /src
parenta9a10b0a055824f676cf426fcd928772aeaa99c8 (diff)
downloadhdf5-c63f9b42ec89ff649f4f086e2f422fa01d9967b1.zip
hdf5-c63f9b42ec89ff649f4f086e2f422fa01d9967b1.tar.gz
hdf5-c63f9b42ec89ff649f4f086e2f422fa01d9967b1.tar.bz2
[svn-r14162] Description:
Make H5Adelete versioned and switch internal library use to H5Adelete2. Add regression test for H5Adelete1 Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'src')
-rw-r--r--src/H5Adeprec.c14
-rw-r--r--src/H5Apublic.h18
-rw-r--r--src/H5vers.txt1
-rw-r--r--src/H5version.h15
4 files changed, 42 insertions, 6 deletions
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index e9d8327..6c4502e 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -443,28 +443,31 @@ done:
FUNC_LEAVE_API(ret_value)
} /* H5Aiterate() */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/*--------------------------------------------------------------------------
NAME
- H5Adelete
+ H5Adelete1
PURPOSE
Deletes an attribute from a location
USAGE
- herr_t H5Adelete (loc_id, name)
+ herr_t H5Adelete1(loc_id, name)
hid_t loc_id; IN: Object (dataset or group) to have attribute deleted from
const char *name; IN: Name of attribute to delete
RETURNS
Non-negative on success/Negative on failure
DESCRIPTION
This function removes the named attribute from a dataset or group.
+ NOTE
+ Deprecated in favor of H5Adelete2
--------------------------------------------------------------------------*/
herr_t
-H5Adelete(hid_t loc_id, const char *name)
+H5Adelete1(hid_t loc_id, const char *name)
{
H5G_loc_t loc; /* Object location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Adelete, FAIL)
+ FUNC_ENTER_API(H5Adelete1, FAIL)
H5TRACE2("e", "i*s", loc_id, name);
/* check arguments */
@@ -481,5 +484,6 @@ H5Adelete(hid_t loc_id, const char *name)
done:
FUNC_LEAVE_API(ret_value)
-} /* H5Adelete() */
+} /* H5Adelete1() */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5Apublic.h b/src/H5Apublic.h
index 3a440a9..e1106f9 100644
--- a/src/H5Apublic.h
+++ b/src/H5Apublic.h
@@ -92,7 +92,23 @@ H5_DLL int H5Aget_num_attrs(hid_t loc_id);
H5_DLL herr_t H5Arename(hid_t loc_id, const char *old_name, const char *new_name);
H5_DLL herr_t H5Aiterate(hid_t loc_id, unsigned *attr_num, H5A_operator_t op,
void *op_data);
-H5_DLL herr_t H5Adelete(hid_t loc_id, const char *name);
+
+/* Symbols defined for compatibility with previous versions of the HDF5 API.
+ *
+ * Use of these symbols is deprecated.
+ */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+
+/* Macros */
+
+
+/* Typedefs */
+
+
+/* Function prototypes */
+H5_DLL herr_t H5Adelete1(hid_t loc_id, const char *name);
+
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
#ifdef __cplusplus
}
diff --git a/src/H5vers.txt b/src/H5vers.txt
index ec7910d..3bafc28 100644
--- a/src/H5vers.txt
+++ b/src/H5vers.txt
@@ -45,6 +45,7 @@
# API function names
# (although not required, it's easier to compare this file with the headers
# generated if the list below is in alphanumeric sort order - QAK)
+FUNCTION: H5Adelete; ; 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 a1418f4..bdfa8bb 100644
--- a/src/H5version.h
+++ b/src/H5version.h
@@ -38,6 +38,10 @@
/* Functions */
/*************/
+#if !defined(H5Adelete_vers)
+#define H5Adelete_vers 1
+#endif /* !defined(H5Adelete_vers) */
+
#if !defined(H5Eclear_vers)
#define H5Eclear_vers 1
#endif /* !defined(H5Eclear_vers) */
@@ -103,6 +107,17 @@
/* Functions */
/*************/
+#if !defined(H5Adelete_vers) || H5Adelete_vers == 2
+#ifndef H5Adelete_vers
+#define H5Adelete_vers 2
+#endif /* H5Adelete_vers */
+#define H5Adelete H5Adelete2
+#elif H5Adelete_vers == 1
+#define H5Adelete H5Adelete1
+#else /* H5Adelete_vers */
+#error "H5Adelete_vers set to invalid value"
+#endif /* H5Adelete_vers */
+
#if !defined(H5Eclear_vers) || H5Eclear_vers == 2
#ifndef H5Eclear_vers
#define H5Eclear_vers 2