summaryrefslogtreecommitdiffstats
path: root/src/H5Fprivate.h
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-01-10 17:32:35 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-01-10 18:00:22 (GMT)
commitf4d8894158e8624f5d89cb6903a0017e2abdc670 (patch)
tree521bfa860e0467938c97c1f00b927b7cbcef2c65 /src/H5Fprivate.h
parent3fd9dc7b83fdff1ea0ecf5d7ef5a4ad2ddfeae51 (diff)
downloadhdf5-f4d8894158e8624f5d89cb6903a0017e2abdc670.zip
hdf5-f4d8894158e8624f5d89cb6903a0017e2abdc670.tar.gz
hdf5-f4d8894158e8624f5d89cb6903a0017e2abdc670.tar.bz2
Straggler from previous: provide uint64_decode().
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r--src/H5Fprivate.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index f04d284..ca8aef2 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -203,6 +203,20 @@ typedef struct H5F_t H5F_t;
(p) += 8; \
}
+static inline uint64_t
+uint64_decode(uint8_t **pp)
+{
+ int i;
+ uint8_t *p = *pp;
+ uint64_t v = 0;
+
+ for (i = 0; i < 8; i++) {
+ v = (v << 8) | p[7 - i];
+ }
+ *pp += 8;
+ return v;
+}
+
# define UINT64DECODE(p, n) { \
/* WE DON'T CHECK FOR OVERFLOW! */ \
size_t _i; \