summaryrefslogtreecommitdiffstats
path: root/src/H5Fprivate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r--src/H5Fprivate.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 6031746..c55c616 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -300,20 +300,24 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
case 2: UINT16DECODE(p, o); break; \
}
-#define H5F_ENCODE_LENGTH(f,p,l) switch(H5F_SIZEOF_SIZE(f)) { \
+#define H5F_ENCODE_LENGTH_LEN(p,l,s) switch(s) { \
case 4: UINT32ENCODE(p,l); break; \
case 8: UINT64ENCODE(p,l); break; \
case 2: UINT16ENCODE(p,l); break; \
default: HDassert("bad sizeof size" && 0); \
}
-#define H5F_DECODE_LENGTH(f,p,l) switch(H5F_SIZEOF_SIZE(f)) { \
+#define H5F_ENCODE_LENGTH(f,p,l) H5F_ENCODE_LENGTH_LEN(p,l,H5F_SIZEOF_SIZE(f))
+
+#define H5F_DECODE_LENGTH_LEN(p,l,s) switch(s) { \
case 4: UINT32DECODE(p,l); break; \
case 8: UINT64DECODE(p,l); break; \
case 2: UINT16DECODE(p,l); break; \
default: HDassert("bad sizeof size" && 0); \
}
+#define H5F_DECODE_LENGTH(f,p,l) H5F_DECODE_LENGTH_LEN(p,l,H5F_SIZEOF_SIZE(f))
+
/*
* Macros that check for overflows. These are somewhat dangerous to fiddle
* with.