summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Adeprec.c2
-rw-r--r--src/H5Apkg.h4
-rw-r--r--src/H5Apublic.h2
-rw-r--r--src/H5Oattribute.c78
4 files changed, 45 insertions, 41 deletions
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index 9ca3d5a..65b876e 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -274,6 +274,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* H5Aopen_idx() */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/*--------------------------------------------------------------------------
NAME
@@ -334,7 +335,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* H5Aget_num_attrs() */
-#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
* Function: H5Arename1
diff --git a/src/H5Apkg.h b/src/H5Apkg.h
index f72de64..049877e 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -267,8 +267,10 @@ H5_DLL herr_t H5O_attr_remove(const H5O_loc_t *loc, const char *name,
hid_t dxpl_id);
H5_DLL herr_t H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, hid_t dxpl_id);
-H5_DLL int H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id);
H5_DLL htri_t H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id);
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+H5_DLL int H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id);
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Testing functions */
#ifdef H5A_TESTING
diff --git a/src/H5Apublic.h b/src/H5Apublic.h
index d20ad8f..76dec27 100644
--- a/src/H5Apublic.h
+++ b/src/H5Apublic.h
@@ -84,7 +84,6 @@ H5_DLL hid_t H5Acreate(hid_t loc_id, const char *name, hid_t type_id,
hid_t space_id, hid_t plist_id);
H5_DLL hid_t H5Aopen_name(hid_t loc_id, const char *name);
H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx);
-H5_DLL int H5Aget_num_attrs(hid_t loc_id);
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
@@ -103,6 +102,7 @@ typedef herr_t (*H5A_operator1_t)(hid_t location_id/*in*/,
/* Function prototypes */
+H5_DLL int H5Aget_num_attrs(hid_t loc_id);
H5_DLL herr_t H5Adelete1(hid_t loc_id, const char *name);
H5_DLL herr_t H5Arename1(hid_t loc_id, const char *old_name, const char *new_name);
H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op,
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index 5050e5c..5c0a91a 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -1550,44 +1550,6 @@ H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
/*-------------------------------------------------------------------------
- * Function: H5O_attr_count
- *
- * Purpose: Determine the # of attributes on an object
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Quincey Koziol
- * Monday, December 11, 2006
- *
- *-------------------------------------------------------------------------
- */
-int
-H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id)
-{
- H5O_t *oh = NULL; /* Pointer to actual object header */
- int ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT(H5O_attr_count)
-
- /* Check arguments */
- HDassert(loc);
-
- /* Protect the object header to iterate over */
- if(NULL == (oh = (H5O_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, NULL, NULL, H5AC_READ)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, FAIL, "unable to load object header")
-
- /* Retrieve # of attributes on object */
- ret_value = (int)H5O_attr_count_real(loc->file, dxpl_id, oh);
-
-done:
- if(oh && H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, oh, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_PROTECT, FAIL, "unable to release object header")
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_attr_count */
-
-
-/*-------------------------------------------------------------------------
* Function: H5O_attr_exists_cb
*
* Purpose: Object header iterator callback routine to check for an
@@ -1765,3 +1727,43 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_attr_bh_info() */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+
+/*-------------------------------------------------------------------------
+ * Function: H5O_attr_count
+ *
+ * Purpose: Determine the # of attributes on an object
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Monday, December 11, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id)
+{
+ H5O_t *oh = NULL; /* Pointer to actual object header */
+ int ret_value; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_count)
+
+ /* Check arguments */
+ HDassert(loc);
+
+ /* Protect the object header to iterate over */
+ if(NULL == (oh = (H5O_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, NULL, NULL, H5AC_READ)))
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, FAIL, "unable to load object header")
+
+ /* Retrieve # of attributes on object */
+ ret_value = (int)H5O_attr_count_real(loc->file, dxpl_id, oh);
+
+done:
+ if(oh && H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, oh, H5AC__NO_FLAGS_SET) < 0)
+ HDONE_ERROR(H5E_ATTR, H5E_PROTECT, FAIL, "unable to release object header")
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5O_attr_count */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+