summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-05-16 15:54:10 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-05-16 15:54:10 (GMT)
commit4977e0ac5163ce29211596f84cb39c3c5e525a16 (patch)
tree12575070e98d19b0ed130886140b10345c6026d3 /src
parenta4345b99179330c06f6945423ee05ac6bfbbdb9c (diff)
downloadhdf5-4977e0ac5163ce29211596f84cb39c3c5e525a16.zip
hdf5-4977e0ac5163ce29211596f84cb39c3c5e525a16.tar.gz
hdf5-4977e0ac5163ce29211596f84cb39c3c5e525a16.tar.bz2
[svn-r10746] Purpose: Minor correction
Description: H5Eget_num used to return an INT type. That's not consistent with the parameter of H5Epop. Solution: Changed it to SIZE_T type. Platforms tested: fuss - very simple change.
Diffstat (limited to 'src')
-rw-r--r--src/H5E.c20
-rw-r--r--src/H5Epublic.h2
2 files changed, 14 insertions, 8 deletions
diff --git a/src/H5E.c b/src/H5E.c
index 2323288..9fb86f5 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -103,7 +103,7 @@ static ssize_t H5E_get_msg(const H5E_msg_t *msg_ptr, H5E_type_t *type, char *msg
static H5E_t *H5E_get_current_stack(void);
static herr_t H5E_set_current_stack(H5E_t *estack);
static herr_t H5E_close_stack(H5E_t *err_stack);
-static int H5E_get_num(const H5E_t *err_stack);
+static size_t H5E_get_num(const H5E_t *err_stack);
static herr_t H5E_pop(H5E_t *err_stack, size_t count);
static herr_t H5E_clear_entries(H5E_t *estack, size_t nentries);
static herr_t H5E_print_stack(const H5E_t *estack, FILE *stream);
@@ -1252,14 +1252,17 @@ done:
* Friday, July 15, 2003
*
* Modifications:
+ * Raymond Lu
+ * Monday, May 16, 2005
+ * Changed return value type from INT to SIZE_T.
*
*-------------------------------------------------------------------------
*/
-int
+size_t
H5Eget_num(hid_t error_stack_id)
{
- H5E_t *estack; /* Error stack to operate on */
- int ret_value; /* Return value */
+ H5E_t *estack; /* Error stack to operate on */
+ size_t ret_value; /* Return value */
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(H5Eget_num, FAIL)
@@ -1299,19 +1302,22 @@ done:
* Friday, July 15, 2003
*
* Modifications:
+ * Raymond Lu
+ * Monday, May 16, 2005
+ * Changed return value type from INT to SIZE_T.
*
*-------------------------------------------------------------------------
*/
-static int
+static size_t
H5E_get_num(const H5E_t *estack)
{
- int ret_value; /* Return value */
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5E_get_num, FAIL)
assert(estack);
- H5_ASSIGN_OVERFLOW(ret_value,estack->nused,size_t,int);
+ ret_value = estack->nused;
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Epublic.h b/src/H5Epublic.h
index dd71563..2508cc5 100644
--- a/src/H5Epublic.h
+++ b/src/H5Epublic.h
@@ -155,7 +155,7 @@ H5_DLL hid_t H5Eget_current_stack(void);
H5_DLL herr_t H5Eclose_stack(hid_t stack_id);
H5_DLL ssize_t H5Eget_class_name(hid_t class_id, char *name, size_t size);
H5_DLL ssize_t H5Eget_msg(hid_t msg_id, H5E_type_t *type, char *msg, size_t size);
-H5_DLL int H5Eget_num(hid_t error_stack_id);
+H5_DLL size_t H5Eget_num(hid_t error_stack_id);
H5_DLL herr_t H5Eset_current_stack(hid_t err_stack_id);
H5_DLL herr_t H5Epop(hid_t err_stack, size_t count);
H5_DLL herr_t H5Eauto_is_stack(hid_t err_stack, unsigned *is_stack);