summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5A.c16
-rw-r--r--src/H5Dint.c22
-rw-r--r--src/H5E.c21
-rw-r--r--src/H5Epublic.h2
-rw-r--r--src/H5F.c17
-rw-r--r--src/H5FD.c22
-rw-r--r--src/H5G.c10
-rw-r--r--src/H5Gtraverse.c2
-rw-r--r--src/H5I.c102
-rw-r--r--src/H5Ipkg.h8
-rw-r--r--src/H5Iprivate.h2
-rw-r--r--src/H5Ipublic.h4
-rw-r--r--src/H5Lpublic.h2
-rw-r--r--src/H5Pint.c36
-rw-r--r--src/H5Ppublic.h3
-rw-r--r--src/H5R.c23
-rw-r--r--src/H5S.c11
-rw-r--r--src/H5Spublic.h2
-rw-r--r--src/H5T.c20
-rw-r--r--src/H5Z.c4
-rw-r--r--src/H5overflow.h315
-rw-r--r--src/H5overflow.txt1
-rw-r--r--src/H5public.h3
23 files changed, 463 insertions, 185 deletions
diff --git a/src/H5A.c b/src/H5A.c
index a414689..857627b 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -177,17 +177,23 @@ H5A_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
- if((n = H5I_nmembers(H5I_ATTR))>0) {
+ if(H5I_nmembers(H5I_ATTR) > 0) {
(void)H5I_clear_type(H5I_ATTR, FALSE, FALSE);
- } else {
+ n++; /*H5I*/
+ } /* end if */
+ else {
/* Close deprecated interface */
n += H5A__term_deprec_interface();
+ /* Destroy the attribute object id group */
(void)H5I_dec_type_ref(H5I_ATTR);
+ n++; /*H5I*/
+
+ /* Mark closed */
H5_interface_initialize_g = 0;
- n = 1;
- }
- }
+ } /* end else */
+ } /* end if */
+
FUNC_LEAVE_NOAPI(n)
} /* H5A_term_interface() */
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 6c61d28..c839df3 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -224,12 +224,12 @@ done:
int
H5D_term_interface(void)
{
- int n=0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
- if((n=H5I_nmembers(H5I_DATASET))>0) {
+ if(H5I_nmembers(H5I_DATASET) > 0) {
/* The dataset API uses the "force" flag set to true because it
* is using the "file objects" (H5FO) API functions to track open
* objects in the file. Using the H5FO code means that dataset
@@ -252,19 +252,25 @@ H5D_term_interface(void)
*
* QAK - 5/13/03
*/
- H5I_clear_type(H5I_DATASET, TRUE, FALSE);
- } else {
+ (void)H5I_clear_type(H5I_DATASET, TRUE, FALSE);
+ n++; /*H5I*/
+ } /* end if */
+ else {
/* Close public interface */
n += H5D__term_pub_interface();
/* Close deprecated interface */
n += H5D__term_deprec_interface();
- H5I_dec_type_ref(H5I_DATASET);
+ /* Destroy the dataset object id group */
+ (void)H5I_dec_type_ref(H5I_DATASET);
+ n++; /*H5I*/
+
+ /* Mark closed */
H5_interface_initialize_g = 0;
- n = 1; /*H5I*/
- }
- }
+ } /* end else */
+ } /* end if */
+
FUNC_LEAVE_NOAPI(n)
} /* end H5D_term_interface() */
diff --git a/src/H5E.c b/src/H5E.c
index 177ec55..f36ab9a 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -288,22 +288,21 @@ H5E_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
- int ncls, nmsg, nstk;
+ int64_t ncls, nmsg, nstk;
/* Check if there are any open error stacks, classes or messages */
ncls = H5I_nmembers(H5I_ERROR_CLASS);
nmsg = H5I_nmembers(H5I_ERROR_MSG);
nstk = H5I_nmembers(H5I_ERROR_STACK);
- n = ncls + nmsg + nstk;
- if(n > 0) {
+ if((ncls + nmsg + nstk) > 0) {
/* Clear any outstanding error stacks */
if(nstk > 0)
- H5I_clear_type(H5I_ERROR_STACK, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_ERROR_STACK, FALSE, FALSE);
/* Clear all the error classes */
if(ncls > 0) {
- H5I_clear_type(H5I_ERROR_CLASS, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_ERROR_CLASS, FALSE, FALSE);
/* Reset the HDF5 error class, if its been closed */
if(H5I_nmembers(H5I_ERROR_CLASS) == 0)
@@ -312,7 +311,7 @@ H5E_term_interface(void)
/* Clear all the error messages */
if(nmsg > 0) {
- H5I_clear_type(H5I_ERROR_MSG, FALSE, FALSE);
+ (void)H5I_clear_type(H5I_ERROR_MSG, FALSE, FALSE);
/* Reset the HDF5 error messages, if they've been closed */
if(H5I_nmembers(H5I_ERROR_MSG) == 0) {
@@ -320,19 +319,21 @@ H5E_term_interface(void)
#include "H5Eterm.h"
} /* end if */
} /* end if */
+
+ n++; /*H5I*/
} /* end if */
else {
/* Close deprecated interface */
n += H5E__term_deprec_interface();
/* Destroy the error class, message, and stack id groups */
- H5I_dec_type_ref(H5I_ERROR_STACK);
- H5I_dec_type_ref(H5I_ERROR_CLASS);
- H5I_dec_type_ref(H5I_ERROR_MSG);
+ (void)H5I_dec_type_ref(H5I_ERROR_STACK);
+ (void)H5I_dec_type_ref(H5I_ERROR_CLASS);
+ (void)H5I_dec_type_ref(H5I_ERROR_MSG);
+ n++; /*H5I*/
/* Mark closed */
H5_interface_initialize_g = 0;
- n = 1; /*H5I*/
} /* end else */
} /* end if */
diff --git a/src/H5Epublic.h b/src/H5Epublic.h
index 932b857..17a35d9 100644
--- a/src/H5Epublic.h
+++ b/src/H5Epublic.h
@@ -26,7 +26,7 @@
#include "H5Ipublic.h"
/* Value for the default error stack */
-#define H5E_DEFAULT 0
+#define H5E_DEFAULT (hid_t)0
/* Different kinds of error information */
typedef enum H5E_type_t {
diff --git a/src/H5F.c b/src/H5F.c
index f25f00f..58ccc37 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -168,23 +168,28 @@ H5F_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
- if((n = H5I_nmembers(H5I_FILE)) != 0) {
- H5I_clear_type(H5I_FILE, FALSE, FALSE);
- } else {
+ if(H5I_nmembers(H5I_FILE) > 0) {
+ (void)H5I_clear_type(H5I_FILE, FALSE, FALSE);
+ n++; /*H5I*/
+ } /* end if */
+ else {
/* Make certain we've cleaned up all the shared file objects */
H5F_sfile_assert_num(0);
/* Close deprecated interface */
n += H5F__term_deprec_interface();
- H5I_dec_type_ref(H5I_FILE);
+ /* Destroy the file object id group */
+ (void)H5I_dec_type_ref(H5I_FILE);
+ n++; /*H5I*/
+
+ /* Mark closed */
H5_interface_initialize_g = 0;
- n = 1; /*H5I*/
} /* end else */
} /* end if */
FUNC_LEAVE_NOAPI(n)
-} /* H5F_term_interface() */
+} /* end H5F_term_interface() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FD.c b/src/H5FD.c
index be7f307..c556cd0 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -200,16 +200,22 @@ H5FD_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
- if((n=H5I_nmembers(H5I_VFL))!=0) {
- H5I_clear_type(H5I_VFL, FALSE, FALSE);
- } else {
- H5I_dec_type_ref(H5I_VFL);
+ if(H5I_nmembers(H5I_VFL) > 0) {
+ (void)H5I_clear_type(H5I_VFL, FALSE, FALSE);
+ n++; /*H5I*/
+ } /* end if */
+ else {
+ /* Destroy the VFL driver id group */
+ (void)H5I_dec_type_ref(H5I_VFL);
+ n++; /*H5I*/
+
+ /* Mark closed */
H5_interface_initialize_g = 0;
- n = 1; /*H5I*/
- }
- }
+ } /* end else */
+ } /* end if */
+
FUNC_LEAVE_NOAPI(n)
-}
+} /* end H5FD_term_interface() */
/*-------------------------------------------------------------------------
diff --git a/src/H5G.c b/src/H5G.c
index 7c2dc9c..e929eaf 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -224,18 +224,20 @@ H5G_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
- if((n = H5I_nmembers(H5I_GROUP)))
- H5I_clear_type(H5I_GROUP, FALSE, FALSE);
+ if(H5I_nmembers(H5I_GROUP) > 0) {
+ (void)H5I_clear_type(H5I_GROUP, FALSE, FALSE);
+ n++; /*H5I*/
+ } /* end if */
else {
/* Close deprecated interface */
n += H5G__term_deprec_interface();
/* Destroy the group object id group */
- H5I_dec_type_ref(H5I_GROUP);
+ (void)H5I_dec_type_ref(H5I_GROUP);
+ n++; /*H5I*/
/* Mark closed */
H5_interface_initialize_g = 0;
- n = 1; /*H5I*/
} /* end else */
} /* end if */
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index 1efc521..72e3201 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -276,7 +276,7 @@ H5G_traverse_ud(const H5G_loc_t *grp_loc/*in,out*/, const H5O_link_t *lnk,
*/
if(H5I_dec_ref(cb_return) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close atom from UD callback")
- cb_return = (-1);
+ cb_return = (hid_t)(-1);
done:
/* Close location given to callback. */
diff --git a/src/H5I.c b/src/H5I.c
index 2250255..ba1fef2 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -64,8 +64,8 @@
/* Local Macros */
/* Combine a Type number and an atom index into an atom */
-#define H5I_MAKE(g,i) ((((hid_t)(g)&TYPE_MASK)<<ID_BITS)| \
- ((hid_t)(i)&ID_MASK))
+#define H5I_MAKE(g,i) ((((hid_t)(g) & TYPE_MASK) << ID_BITS) | \
+ ((hid_t)(i) & ID_MASK))
/* Local typedefs */
@@ -81,9 +81,8 @@ typedef struct H5I_id_info_t {
typedef struct {
const H5I_class_t *cls; /* Pointer to ID class */
unsigned init_count; /* # of times this type has been initialized*/
- hbool_t wrapped; /* Whether the id count has wrapped around */
- unsigned id_count; /* Current number of IDs held */
- unsigned nextid; /* ID to use for the next atom */
+ uint64_t id_count; /* Current number of IDs held */
+ uint64_t nextid; /* ID to use for the next atom */
H5SL_t *ids; /* Pointer to skip list that stores IDs */
} H5I_id_type_t;
@@ -93,11 +92,6 @@ typedef struct {
void *ret_obj; /* Object to return */
} H5I_search_ud_t;
-/* User data for iterator callback when IDs have wrapped */
-typedef struct {
- unsigned nextid; /* Next ID to expect */
-} H5I_wrap_ud_t;
-
/* User data for iterator callback for ID iteration */
typedef struct {
H5I_search_func_t user_func; /* 'User' function to invoke */
@@ -340,7 +334,6 @@ H5I_register_type(const H5I_class_t *cls)
/* Initialize the ID type structure for new types */
if(type_ptr->init_count == 0) {
type_ptr->cls = cls;
- type_ptr->wrapped = FALSE;
type_ptr->id_count = 0;
type_ptr->nextid = cls->reserved;
if(NULL == (type_ptr->ids = H5SL_create(H5SL_TYPE_HID, NULL)))
@@ -435,12 +428,12 @@ H5Inmembers(H5I_type_t type, hsize_t *num_members)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "supplied type does not exist")
if(num_members) {
- int members;
+ int64_t members;
if((members = H5I_nmembers(type)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTCOUNT, FAIL, "can't compute number of members")
- *num_members = (hsize_t)members;
+ H5_ASSIGN_OVERFLOW(*num_members, members, int64_t, hsize_t);
} /* end if */
done:
@@ -463,7 +456,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-int
+int64_t
H5I_nmembers(H5I_type_t type)
{
H5I_id_type_t *type_ptr = NULL;
@@ -477,7 +470,7 @@ H5I_nmembers(H5I_type_t type)
HGOTO_DONE(0);
/* Set return value */
- H5_ASSIGN_OVERFLOW(ret_value, type_ptr->id_count, unsigned, int);
+ H5_ASSIGN_OVERFLOW(ret_value, type_ptr->id_count, uint64_t, int64_t);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -734,47 +727,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5I__wrapped_cb
- *
- * Purpose: Callback for searching for next free ID, when IDs have wrapped
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * Thursday, October 3, 2013
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5I__wrapped_cb(void *_item, void UNUSED *_key, void *_udata)
-{
- H5I_id_info_t *item = (H5I_id_info_t *)_item; /* Pointer to the ID node */
- H5I_wrap_ud_t *udata = (H5I_wrap_ud_t *)_udata; /* Pointer to user data */
- int ret_value = H5_ITER_CONT; /* Return value */
-
- FUNC_ENTER_STATIC_NOERR
-
- /* Sanity check */
- HDassert(item);
- HDassert(udata);
-
- /* Break out if we see a free ID */
- if(udata->nextid != item->id) {
- /* Sanity check */
- HDassert(item->id > udata->nextid);
-
- ret_value = H5_ITER_STOP;
- } /* end if */
- else
- /* Increment to expect the next ID */
- udata->nextid++;
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5I__wrapped_cb() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5I_register
*
* Purpose: Registers an OBJECT in a TYPE and returns an ID for it.
@@ -825,38 +777,9 @@ H5I_register(H5I_type_t type, const void *object, hbool_t app_ref)
type_ptr->nextid++;
/*
- * This next section of code checks for the 'nextid' getting too large and
- * wrapping around, thus necessitating checking for duplicate IDs being
- * handed out.
+ * Sanity check for the 'nextid' getting too large and wrapping around.
*/
- if(type_ptr->nextid > (unsigned)ID_MASK)
- type_ptr->wrapped = TRUE;
-
- /*
- * If we've wrapped around then we need to check for duplicate id's being
- * handed out.
- */
- if(type_ptr->wrapped) {
- H5I_wrap_ud_t udata; /* User data for iteration */
- herr_t iter_status; /* Iteration status */
-
- /* Set up user data for iteration */
- udata.nextid = type_ptr->cls->reserved;
-
- /* Iterate over all the ID nodes, looking for a gap in the ID sequence */
- if((iter_status = H5SL_iterate(type_ptr->ids, H5I__wrapped_cb, &udata)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_BADITER, FAIL, "ID iteration failed")
-
- /* If we didn't break out of the iteration and we're at the max. ID, we've used all the IDs */
- if(0 == iter_status && udata.nextid >= ID_MASK)
- HGOTO_ERROR(H5E_ATOM, H5E_NOIDS, FAIL, "no IDs available in type")
-
- /* Sanity check */
- HDassert(udata.nextid < ID_MASK);
-
- /* Retain the next ID for the class */
- type_ptr->nextid = udata.nextid;
- } /* end if */
+ HDassert(type_ptr->nextid <= ID_MASK);
/* Set return value */
ret_value = new_id;
@@ -2325,9 +2248,8 @@ H5I__debug(H5I_type_t type)
/* Header */
fprintf(stderr, " init_count = %u\n", type_ptr->init_count);
fprintf(stderr, " reserved = %u\n", type_ptr->cls->reserved);
- fprintf(stderr, " wrapped = %u\n", type_ptr->wrapped);
- fprintf(stderr, " id_count = %u\n", type_ptr->id_count);
- fprintf(stderr, " nextid = %u\n", type_ptr->nextid);
+ fprintf(stderr, " id_count = %llu\n", (unsigned long long)type_ptr->id_count);
+ fprintf(stderr, " nextid = %llu\n", (unsigned long long)type_ptr->nextid);
/* List */
fprintf(stderr, " List:\n");
diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h
index dc8e867..1666b76 100644
--- a/src/H5Ipkg.h
+++ b/src/H5Ipkg.h
@@ -44,7 +44,7 @@
* field sizes and masks are calculated from TYPE_BITS.
*/
#define TYPE_BITS 7
-#define TYPE_MASK ((1<<TYPE_BITS)-1)
+#define TYPE_MASK (((hid_t)1 << TYPE_BITS) - 1)
#define H5I_MAX_NUM_TYPES TYPE_MASK
@@ -52,11 +52,11 @@
* Number of bits to use for the Atom index in each atom (assumes 8-bit
* bytes). We don't use the sign bit.
*/
-#define ID_BITS ((sizeof(hid_t)*8)-(TYPE_BITS+1))
-#define ID_MASK ((1<<ID_BITS)-1)
+#define ID_BITS ((sizeof(hid_t) * 8) - (TYPE_BITS + 1))
+#define ID_MASK (((hid_t)1 << ID_BITS) - 1)
/* Map an atom to an ID type number */
-#define H5I_TYPE(a) ((H5I_type_t)(((hid_t)(a)>>ID_BITS) & TYPE_MASK))
+#define H5I_TYPE(a) ((H5I_type_t)(((hid_t)(a) >> ID_BITS) & TYPE_MASK))
/****************************/
diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h
index b8f54f1..f438581 100644
--- a/src/H5Iprivate.h
+++ b/src/H5Iprivate.h
@@ -66,7 +66,7 @@ typedef struct H5I_class_t {
/* Library-private Function Prototypes */
/***************************************/
H5_DLL herr_t H5I_register_type(const H5I_class_t *cls);
-H5_DLL int H5I_nmembers(H5I_type_t type);
+H5_DLL int64_t H5I_nmembers(H5I_type_t type);
H5_DLL herr_t H5I_clear_type(H5I_type_t type, hbool_t force, hbool_t app_ref);
H5_DLL hid_t H5I_register(H5I_type_t type, const void *object, hbool_t app_ref);
H5_DLL void *H5I_subst(hid_t id, const void *new_object);
diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h
index 5160434..3bf3c66 100644
--- a/src/H5Ipublic.h
+++ b/src/H5Ipublic.h
@@ -53,8 +53,8 @@ typedef enum H5I_type_t {
} H5I_type_t;
/* Type of atoms to return to users */
-typedef int hid_t;
-#define H5_SIZEOF_HID_T H5_SIZEOF_INT
+typedef int64_t hid_t;
+#define H5_SIZEOF_HID_T H5_SIZEOF_INT64_T
/* An invalid object ID. This is also negative for error return. */
#define H5I_INVALID_HID (-1)
diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h
index 20b57e5..ff2322f 100644
--- a/src/H5Lpublic.h
+++ b/src/H5Lpublic.h
@@ -40,7 +40,7 @@
#define H5L_MAX_LINK_NAME_LEN ((uint32_t)(-1)) /* (4GB - 1) */
/* Macro to indicate operation occurs on same location */
-#define H5L_SAME_LOC 0
+#define H5L_SAME_LOC (hid_t)0
/* Current version of the H5L_class_t struct */
#define H5L_LINK_CLASS_T_VERS 0
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 1545b6a..c71a39b 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -513,28 +513,27 @@ done:
int
H5P_term_interface(void)
{
- int nlist=0;
- int nclass=0;
- int n=0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
+ int64_t nlist, nclass;
+
/* Destroy HDF5 library property classes & lists */
/* Check if there are any open property list classes or lists */
nclass = H5I_nmembers(H5I_GENPROP_CLS);
nlist = H5I_nmembers(H5I_GENPROP_LST);
- n=nclass+nlist;
/* If there are any open classes or groups, attempt to get rid of them. */
- if(n) {
+ if((nclass + nlist) > 0) {
/* Clear the lists */
- if(nlist>0) {
- H5I_clear_type(H5I_GENPROP_LST, FALSE, FALSE);
+ if(nlist > 0) {
+ (void)H5I_clear_type(H5I_GENPROP_LST, FALSE, FALSE);
/* Reset the default property lists, if they've been closed */
- if(H5I_nmembers(H5I_GENPROP_LST)==0) {
+ if(H5I_nmembers(H5I_GENPROP_LST) == 0) {
H5P_LST_FILE_CREATE_ID_g =
H5P_LST_FILE_ACCESS_ID_g =
H5P_LST_DATASET_CREATE_ID_g =
@@ -553,11 +552,11 @@ H5P_term_interface(void)
} /* end if */
/* Only attempt to close the classes after all the lists are closed */
- if(nlist==0 && nclass>0) {
- H5I_clear_type(H5I_GENPROP_CLS, FALSE, FALSE);
+ if(nlist == 0 && nclass > 0) {
+ (void)H5I_clear_type(H5I_GENPROP_CLS, FALSE, FALSE);
/* Reset the default property lists, if they've been closed */
- if(H5I_nmembers(H5I_GENPROP_CLS)==0) {
+ if(H5I_nmembers(H5I_GENPROP_CLS) == 0) {
H5P_CLS_ROOT_g =
H5P_CLS_OBJECT_CREATE_g =
H5P_CLS_FILE_CREATE_g =
@@ -595,6 +594,8 @@ H5P_term_interface(void)
H5P_CLS_FILE_MOUNT_ID_g = (-1);
} /* end if */
} /* end if */
+
+ n++; /*H5I*/
} else {
/* Close public interface */
n += H5P__term_pub_interface();
@@ -602,16 +603,19 @@ H5P_term_interface(void)
/* Close deprecated interface */
n += H5P__term_deprec_interface();
- H5I_dec_type_ref(H5I_GENPROP_LST);
+ /* Destroy the property list and class id groups */
+ (void)H5I_dec_type_ref(H5I_GENPROP_LST);
n++; /*H5I*/
- H5I_dec_type_ref(H5I_GENPROP_CLS);
+ (void)H5I_dec_type_ref(H5I_GENPROP_CLS);
n++; /*H5I*/
+ /* Mark closed */
H5_interface_initialize_g = 0;
- }
- }
+ } /* end else */
+ } /* end if */
+
FUNC_LEAVE_NOAPI(n)
-}
+} /* end H5P_term_interface() */
/*--------------------------------------------------------------------------
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index a3f13c5..f56692c 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -92,6 +92,9 @@
#define H5P_CRT_ORDER_TRACKED 0x0001
#define H5P_CRT_ORDER_INDEXED 0x0002
+/* Default value for all property list classes */
+#define H5P_DEFAULT (hid_t)0
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/src/H5R.c b/src/H5R.c
index b453295..8396dcc 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -157,25 +157,30 @@ done:
int
H5R_term_interface(void)
{
- int n=0;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
if (H5_interface_initialize_g) {
- if ((n=H5I_nmembers(H5I_REFERENCE))) {
- H5I_clear_type(H5I_REFERENCE, FALSE, FALSE);
- } else {
+ if(H5I_nmembers(H5I_REFERENCE) > 0) {
+ (void)H5I_clear_type(H5I_REFERENCE, FALSE, FALSE);
+ n++; /*H5I*/
+ } /* end if */
+ else {
/* Close deprecated interface */
n += H5R__term_deprec_interface();
- H5I_dec_type_ref(H5I_REFERENCE);
+ /* Destroy the reference id group */
+ (void)H5I_dec_type_ref(H5I_REFERENCE);
+ n++; /*H5I*/
+
+ /* Mark closed */
H5_interface_initialize_g = 0;
- n = 1; /*H5I*/
- }
- }
+ } /* end else */
+ } /* end if */
FUNC_LEAVE_NOAPI(n)
-}
+} /* end H5R_term_interface() */
/*--------------------------------------------------------------------------
diff --git a/src/H5S.c b/src/H5S.c
index 50e3811..1d5436c 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -145,16 +145,17 @@ H5S_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
- if((n = H5I_nmembers(H5I_DATASPACE))) {
- H5I_clear_type(H5I_DATASPACE, FALSE, FALSE);
+ if(H5I_nmembers(H5I_DATASPACE) > 0) {
+ (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE);
+ n++; /*H5I*/
} /* end if */
else {
- /* Free data types */
- H5I_dec_type_ref(H5I_DATASPACE);
+ /* Destroy the dataspace object id group */
+ (void)H5I_dec_type_ref(H5I_DATASPACE);
+ n++; /*H5I*/
/* Shut down interface */
H5_interface_initialize_g = 0;
- n = 1; /*H5I*/
} /* end else */
} /* end if */
diff --git a/src/H5Spublic.h b/src/H5Spublic.h
index 105530a..7b2f61b 100644
--- a/src/H5Spublic.h
+++ b/src/H5Spublic.h
@@ -24,7 +24,7 @@
#include "H5Ipublic.h"
/* Define atomic datatypes */
-#define H5S_ALL 0
+#define H5S_ALL (hid_t)0
#define H5S_UNLIMITED ((hsize_t)(hssize_t)(-1))
/* Define user-level maximum number of dimensions */
diff --git a/src/H5T.c b/src/H5T.c
index 8b23736..486b5c0 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1436,20 +1436,23 @@ H5T_unlock_cb(void *_dt, hid_t UNUSED id, void UNUSED *key)
int
H5T_term_interface(void)
{
- int i, nprint=0, n=0;
- H5T_path_t *path = NULL;
+ int n = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(H5_interface_initialize_g) {
+ int i, nprint = 0;
+
/* Unregister all conversion functions */
for(i = 0; i < H5T_g.npaths; i++) {
+ H5T_path_t *path;
+
path = H5T_g.path[i];
HDassert(path);
if(path->func) {
H5T__print_stats(path, &nprint/*in,out*/);
path->cdata.command = H5T_CONV_FREE;
- if((path->func)(FAIL, FAIL, &(path->cdata), (size_t)0,
+ if((path->func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0,
(size_t)0, (size_t)0, NULL, NULL,H5AC_dxpl_id) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
@@ -1486,7 +1489,9 @@ H5T_term_interface(void)
/* Close deprecated interface */
n += H5T__term_deprec_interface();
- H5I_dec_type_ref(H5I_DATATYPE);
+ /* Destroy the datatype object id group */
+ (void)H5I_dec_type_ref(H5I_DATATYPE);
+ n++; /*H5I*/
/* Reset all the datatype IDs */
H5T_IEEE_F32BE_g = FAIL;
@@ -1586,7 +1591,6 @@ H5T_term_interface(void)
/* Mark interface as closed */
H5_interface_initialize_g = 0;
- n = 1; /*H5I*/
} /* end if */
FUNC_LEAVE_NOAPI(n)
@@ -2580,7 +2584,7 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
/* Shut down path */
H5T__print_stats(path, &nprint);
path->cdata.command = H5T_CONV_FREE;
- if((path->func)(FAIL, FAIL, &(path->cdata),
+ if((path->func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata),
(size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T)) {
@@ -4394,7 +4398,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
HDsnprintf(H5T_g.path[0]->name, sizeof(H5T_g.path[0]->name), "no-op");
H5T_g.path[0]->func = H5T__conv_noop;
H5T_g.path[0]->cdata.command = H5T_CONV_INIT;
- if(H5T__conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
+ if(H5T__conv_noop((hid_t)FAIL, (hid_t)FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T))
fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
@@ -4553,7 +4557,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
HDassert(table == H5T_g.path[md]);
H5T__print_stats(table, &nprint/*in,out*/);
table->cdata.command = H5T_CONV_FREE;
- if((table->func)(FAIL, FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
+ if((table->func)((hid_t)FAIL, (hid_t)FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
#ifdef H5T_DEBUG
if(H5DEBUG(T)) {
fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free "
diff --git a/src/H5Z.c b/src/H5Z.c
index 30bb2b5..f1a385a 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -971,7 +971,7 @@ H5Z_can_apply_direct(const H5O_pline_t *pline)
HDassert(pline->nused > 0);
/* Make "can apply" callbacks for filters in pipeline */
- if(H5Z_prelude_callback(pline, -1, -1, -1, H5Z_PRELUDE_CAN_APPLY) < 0)
+ if(H5Z_prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_CAN_APPLY) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "unable to apply filter")
done:
@@ -1008,7 +1008,7 @@ H5Z_set_local_direct(const H5O_pline_t *pline)
HDassert(pline->nused > 0);
/* Make "set local" callbacks for filters in pipeline */
- if(H5Z_prelude_callback(pline, -1, -1, -1, H5Z_PRELUDE_SET_LOCAL) < 0)
+ if(H5Z_prelude_callback(pline, (hid_t)-1, (hid_t)-1, (hid_t)-1, H5Z_PRELUDE_SET_LOCAL) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set")
done:
diff --git a/src/H5overflow.h b/src/H5overflow.h
index f4064f4..dc4ed2d 100644
--- a/src/H5overflow.h
+++ b/src/H5overflow.h
@@ -39,6 +39,18 @@
ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
#endif /* src: unsigned dst: int */
+/* src: unsigned, dst: int64_t */
+#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_INT64_T
+ #define ASSIGN_unsigned_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_UNSIGNED > H5_SIZEOF_INT64_T
+ #define ASSIGN_unsigned_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_UNSIGNED == H5_SIZEOF_INT64_T */
+ #define ASSIGN_unsigned_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: unsigned dst: int64_t */
+
/* src: unsigned, dst: uint8_t */
#if H5_SIZEOF_UNSIGNED < H5_SIZEOF_UINT8_T
#define ASSIGN_unsigned_TO_uint8_t(dst, dsttype, src, srctype) \
@@ -186,6 +198,18 @@
ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
#endif /* src: int dst: unsigned */
+/* src: int, dst: int64_t */
+#if H5_SIZEOF_INT < H5_SIZEOF_INT64_T
+ #define ASSIGN_int_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT > H5_SIZEOF_INT64_T
+ #define ASSIGN_int_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT == H5_SIZEOF_INT64_T */
+ #define ASSIGN_int_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: int dst: int64_t */
+
/* src: int, dst: uint8_t */
#if H5_SIZEOF_INT < H5_SIZEOF_UINT8_T
#define ASSIGN_int_TO_uint8_t(dst, dsttype, src, srctype) \
@@ -319,6 +343,165 @@
#endif /* src: int dst: h5_stat_size_t */
+/* Assignment checks for int64_t */
+
+/* src: int64_t, dst: unsigned */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_UNSIGNED
+ #define ASSIGN_int64_t_TO_unsigned(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_UNSIGNED
+ #define ASSIGN_int64_t_TO_unsigned(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_UNSIGNED */
+ #define ASSIGN_int64_t_TO_unsigned(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: unsigned */
+
+/* src: int64_t, dst: int */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_INT
+ #define ASSIGN_int64_t_TO_int(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_INT
+ #define ASSIGN_int64_t_TO_int(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_INT */
+ #define ASSIGN_int64_t_TO_int(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: int */
+
+/* src: int64_t, dst: uint8_t */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_UINT8_T
+ #define ASSIGN_int64_t_TO_uint8_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_UINT8_T
+ #define ASSIGN_int64_t_TO_uint8_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_UINT8_T */
+ #define ASSIGN_int64_t_TO_uint8_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: uint8_t */
+
+/* src: int64_t, dst: uint16_t */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_UINT16_T
+ #define ASSIGN_int64_t_TO_uint16_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_UINT16_T
+ #define ASSIGN_int64_t_TO_uint16_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_UINT16_T */
+ #define ASSIGN_int64_t_TO_uint16_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: uint16_t */
+
+/* src: int64_t, dst: uint32_t */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_UINT32_T
+ #define ASSIGN_int64_t_TO_uint32_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_UINT32_T
+ #define ASSIGN_int64_t_TO_uint32_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_UINT32_T */
+ #define ASSIGN_int64_t_TO_uint32_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: uint32_t */
+
+/* src: int64_t, dst: uint64_t */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_UINT64_T
+ #define ASSIGN_int64_t_TO_uint64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_UINT64_T
+ #define ASSIGN_int64_t_TO_uint64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_UINT64_T */
+ #define ASSIGN_int64_t_TO_uint64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: uint64_t */
+
+/* src: int64_t, dst: ptrdiff_t */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_PTRDIFF_T
+ #define ASSIGN_int64_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_PTRDIFF_T
+ #define ASSIGN_int64_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_PTRDIFF_T */
+ #define ASSIGN_int64_t_TO_ptrdiff_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: ptrdiff_t */
+
+/* src: int64_t, dst: size_t */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_SIZE_T
+ #define ASSIGN_int64_t_TO_size_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_SIZE_T
+ #define ASSIGN_int64_t_TO_size_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_SIZE_T */
+ #define ASSIGN_int64_t_TO_size_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: size_t */
+
+/* src: int64_t, dst: ssize_t */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_SSIZE_T
+ #define ASSIGN_int64_t_TO_ssize_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_SSIZE_T
+ #define ASSIGN_int64_t_TO_ssize_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_SSIZE_T */
+ #define ASSIGN_int64_t_TO_ssize_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: ssize_t */
+
+/* src: int64_t, dst: haddr_t */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_HADDR_T
+ #define ASSIGN_int64_t_TO_haddr_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_HADDR_T
+ #define ASSIGN_int64_t_TO_haddr_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_HADDR_T */
+ #define ASSIGN_int64_t_TO_haddr_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: haddr_t */
+
+/* src: int64_t, dst: hsize_t */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_HSIZE_T
+ #define ASSIGN_int64_t_TO_hsize_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_HSIZE_T
+ #define ASSIGN_int64_t_TO_hsize_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_HSIZE_T */
+ #define ASSIGN_int64_t_TO_hsize_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: hsize_t */
+
+/* src: int64_t, dst: hssize_t */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_HSSIZE_T
+ #define ASSIGN_int64_t_TO_hssize_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_HSSIZE_T
+ #define ASSIGN_int64_t_TO_hssize_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_HSSIZE_T */
+ #define ASSIGN_int64_t_TO_hssize_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: hssize_t */
+
+/* src: int64_t, dst: h5_stat_size_t */
+#if H5_SIZEOF_INT64_T < H5_SIZEOF_H5_STAT_SIZE_T
+ #define ASSIGN_int64_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_INT64_T > H5_SIZEOF_H5_STAT_SIZE_T
+ #define ASSIGN_int64_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_INT64_T == H5_SIZEOF_H5_STAT_SIZE_T */
+ #define ASSIGN_int64_t_TO_h5_stat_size_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SIGNED_TO_UNSIGNED(dst, dsttype, src, srctype)
+#endif /* src: int64_t dst: h5_stat_size_t */
+
+
/* Assignment checks for uint8_t */
/* src: uint8_t, dst: unsigned */
@@ -345,6 +528,18 @@
ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
#endif /* src: uint8_t dst: int */
+/* src: uint8_t, dst: int64_t */
+#if H5_SIZEOF_UINT8_T < H5_SIZEOF_INT64_T
+ #define ASSIGN_uint8_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_UINT8_T > H5_SIZEOF_INT64_T
+ #define ASSIGN_uint8_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_UINT8_T == H5_SIZEOF_INT64_T */
+ #define ASSIGN_uint8_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: uint8_t dst: int64_t */
+
/* src: uint8_t, dst: uint16_t */
#if H5_SIZEOF_UINT8_T < H5_SIZEOF_UINT16_T
#define ASSIGN_uint8_t_TO_uint16_t(dst, dsttype, src, srctype) \
@@ -492,6 +687,18 @@
ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
#endif /* src: uint16_t dst: int */
+/* src: uint16_t, dst: int64_t */
+#if H5_SIZEOF_UINT16_T < H5_SIZEOF_INT64_T
+ #define ASSIGN_uint16_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_UINT16_T > H5_SIZEOF_INT64_T
+ #define ASSIGN_uint16_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_UINT16_T == H5_SIZEOF_INT64_T */
+ #define ASSIGN_uint16_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: uint16_t dst: int64_t */
+
/* src: uint16_t, dst: uint8_t */
#if H5_SIZEOF_UINT16_T < H5_SIZEOF_UINT8_T
#define ASSIGN_uint16_t_TO_uint8_t(dst, dsttype, src, srctype) \
@@ -639,6 +846,18 @@
ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
#endif /* src: uint32_t dst: int */
+/* src: uint32_t, dst: int64_t */
+#if H5_SIZEOF_UINT32_T < H5_SIZEOF_INT64_T
+ #define ASSIGN_uint32_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_UINT32_T > H5_SIZEOF_INT64_T
+ #define ASSIGN_uint32_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_UINT32_T == H5_SIZEOF_INT64_T */
+ #define ASSIGN_uint32_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: uint32_t dst: int64_t */
+
/* src: uint32_t, dst: uint8_t */
#if H5_SIZEOF_UINT32_T < H5_SIZEOF_UINT8_T
#define ASSIGN_uint32_t_TO_uint8_t(dst, dsttype, src, srctype) \
@@ -786,6 +1005,18 @@
ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
#endif /* src: uint64_t dst: int */
+/* src: uint64_t, dst: int64_t */
+#if H5_SIZEOF_UINT64_T < H5_SIZEOF_INT64_T
+ #define ASSIGN_uint64_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_UINT64_T > H5_SIZEOF_INT64_T
+ #define ASSIGN_uint64_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_UINT64_T == H5_SIZEOF_INT64_T */
+ #define ASSIGN_uint64_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: uint64_t dst: int64_t */
+
/* src: uint64_t, dst: uint8_t */
#if H5_SIZEOF_UINT64_T < H5_SIZEOF_UINT8_T
#define ASSIGN_uint64_t_TO_uint8_t(dst, dsttype, src, srctype) \
@@ -933,6 +1164,18 @@
ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
#endif /* src: ptrdiff_t dst: int */
+/* src: ptrdiff_t, dst: int64_t */
+#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_INT64_T
+ #define ASSIGN_ptrdiff_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_PTRDIFF_T > H5_SIZEOF_INT64_T
+ #define ASSIGN_ptrdiff_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_PTRDIFF_T == H5_SIZEOF_INT64_T */
+ #define ASSIGN_ptrdiff_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: ptrdiff_t dst: int64_t */
+
/* src: ptrdiff_t, dst: uint8_t */
#if H5_SIZEOF_PTRDIFF_T < H5_SIZEOF_UINT8_T
#define ASSIGN_ptrdiff_t_TO_uint8_t(dst, dsttype, src, srctype) \
@@ -1080,6 +1323,18 @@
ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
#endif /* src: size_t dst: int */
+/* src: size_t, dst: int64_t */
+#if H5_SIZEOF_SIZE_T < H5_SIZEOF_INT64_T
+ #define ASSIGN_size_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_SIZE_T > H5_SIZEOF_INT64_T
+ #define ASSIGN_size_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_SIZE_T == H5_SIZEOF_INT64_T */
+ #define ASSIGN_size_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: size_t dst: int64_t */
+
/* src: size_t, dst: uint8_t */
#if H5_SIZEOF_SIZE_T < H5_SIZEOF_UINT8_T
#define ASSIGN_size_t_TO_uint8_t(dst, dsttype, src, srctype) \
@@ -1227,6 +1482,18 @@
ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
#endif /* src: ssize_t dst: int */
+/* src: ssize_t, dst: int64_t */
+#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_INT64_T
+ #define ASSIGN_ssize_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_SSIZE_T > H5_SIZEOF_INT64_T
+ #define ASSIGN_ssize_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_SSIZE_T == H5_SIZEOF_INT64_T */
+ #define ASSIGN_ssize_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: ssize_t dst: int64_t */
+
/* src: ssize_t, dst: uint8_t */
#if H5_SIZEOF_SSIZE_T < H5_SIZEOF_UINT8_T
#define ASSIGN_ssize_t_TO_uint8_t(dst, dsttype, src, srctype) \
@@ -1374,6 +1641,18 @@
ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
#endif /* src: haddr_t dst: int */
+/* src: haddr_t, dst: int64_t */
+#if H5_SIZEOF_HADDR_T < H5_SIZEOF_INT64_T
+ #define ASSIGN_haddr_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_HADDR_T > H5_SIZEOF_INT64_T
+ #define ASSIGN_haddr_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_HADDR_T == H5_SIZEOF_INT64_T */
+ #define ASSIGN_haddr_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: haddr_t dst: int64_t */
+
/* src: haddr_t, dst: uint8_t */
#if H5_SIZEOF_HADDR_T < H5_SIZEOF_UINT8_T
#define ASSIGN_haddr_t_TO_uint8_t(dst, dsttype, src, srctype) \
@@ -1521,6 +1800,18 @@
ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
#endif /* src: hsize_t dst: int */
+/* src: hsize_t, dst: int64_t */
+#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_INT64_T
+ #define ASSIGN_hsize_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_HSIZE_T > H5_SIZEOF_INT64_T
+ #define ASSIGN_hsize_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_HSIZE_T == H5_SIZEOF_INT64_T */
+ #define ASSIGN_hsize_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: hsize_t dst: int64_t */
+
/* src: hsize_t, dst: uint8_t */
#if H5_SIZEOF_HSIZE_T < H5_SIZEOF_UINT8_T
#define ASSIGN_hsize_t_TO_uint8_t(dst, dsttype, src, srctype) \
@@ -1668,6 +1959,18 @@
ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
#endif /* src: hssize_t dst: int */
+/* src: hssize_t, dst: int64_t */
+#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_INT64_T
+ #define ASSIGN_hssize_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_HSSIZE_T > H5_SIZEOF_INT64_T
+ #define ASSIGN_hssize_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_HSSIZE_T == H5_SIZEOF_INT64_T */
+ #define ASSIGN_hssize_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_SAME_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: hssize_t dst: int64_t */
+
/* src: hssize_t, dst: uint8_t */
#if H5_SIZEOF_HSSIZE_T < H5_SIZEOF_UINT8_T
#define ASSIGN_hssize_t_TO_uint8_t(dst, dsttype, src, srctype) \
@@ -1815,6 +2118,18 @@
ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
#endif /* src: h5_stat_size_t dst: int */
+/* src: h5_stat_size_t, dst: int64_t */
+#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_INT64_T
+ #define ASSIGN_h5_stat_size_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_LARGER_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#elif H5_SIZEOF_H5_STAT_SIZE_T > H5_SIZEOF_INT64_T
+ #define ASSIGN_h5_stat_size_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SMALLER_SIZE(dst, dsttype, src, srctype)
+#else /* H5_SIZEOF_H5_STAT_SIZE_T == H5_SIZEOF_INT64_T */
+ #define ASSIGN_h5_stat_size_t_TO_int64_t(dst, dsttype, src, srctype) \
+ ASSIGN_TO_SAME_SIZE_UNSIGNED_TO_SIGNED(dst, dsttype, src, srctype)
+#endif /* src: h5_stat_size_t dst: int64_t */
+
/* src: h5_stat_size_t, dst: uint8_t */
#if H5_SIZEOF_H5_STAT_SIZE_T < H5_SIZEOF_UINT8_T
#define ASSIGN_h5_stat_size_t_TO_uint8_t(dst, dsttype, src, srctype) \
diff --git a/src/H5overflow.txt b/src/H5overflow.txt
index c093fd5..3e9f069 100644
--- a/src/H5overflow.txt
+++ b/src/H5overflow.txt
@@ -32,6 +32,7 @@
unsigned, UNSIGNED;
int, SIGNED;
+int64_t, SIGNED;
uint8_t, UNSIGNED;
uint16_t, UNSIGNED;
uint32_t, UNSIGNED;
diff --git a/src/H5public.h b/src/H5public.h
index 91af77f..44f94d4 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -282,9 +282,6 @@ H5_GCC_DIAG_ON(long-long)
# error "nothing appropriate for uint64_t"
#endif
-/* Default value for all property list classes */
-#define H5P_DEFAULT 0
-
/* Common iteration orders */
typedef enum {
H5_ITER_UNKNOWN = -1, /* Unknown order */