summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/H5private.h b/src/H5private.h
index d1bbc24..66bf7eb 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1523,11 +1523,14 @@ extern char *strdup(const char *s);
/* Include the generated overflow header file */
#include "H5overflow.h"
-#define H5_ASSIGN_OVERFLOW(dst, src, srctype, dsttype) \
+/* Assign a variable to one of a different size (think safer dst = (dsttype)src").
+ * The code generated by the macro checks for overflows.
+ */
+#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) \
H5_GLUE4(ASSIGN_,srctype,_TO_,dsttype)(dst,dsttype,src,srctype)\
#else /* NDEBUG */
-#define H5_ASSIGN_OVERFLOW(dst, src, srctype, dsttype) \
+#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) \
(dst) = (dsttype)(src);
#endif /* NDEBUG */