diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2011-08-04 22:04:19 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2011-08-04 22:04:19 +1000 |
commit | 2a7631059fd1b239d7d240423251a5537b2d8b91 (patch) | |
tree | bf65bdfc9a581095a6647afedc698b30d9440235 /src/include/cell.i | |
parent | 50f64e23ca7624d64a19a836e3c78e3b3e92bc62 (diff) | |
download | mongo-2a7631059fd1b239d7d240423251a5537b2d8b91.tar.gz |
Remove declarations for static inline functions, when mixed with non-inlined code, move the inlined functions to the top. This is required for some compilers to inline at all, and avoids the need for a "STATIN" to shorten "static inline" declarations.
Diffstat (limited to 'src/include/cell.i')
-rw-r--r-- | src/include/cell.i | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/src/include/cell.i b/src/include/cell.i index 2486bb26c8c..4faf5a28c87 100644 --- a/src/include/cell.i +++ b/src/include/cell.i @@ -5,15 +5,6 @@ * All rights reserved. */ -#undef STATIN -#define STATIN static inline - -STATIN uint32_t __wt_cell_pack_data(WT_CELL *, uint64_t, uint32_t); -STATIN uint32_t __wt_cell_pack_key(WT_CELL *, uint8_t, uint32_t); -STATIN uint32_t __wt_cell_pack_type(WT_CELL *, uint8_t, uint64_t); -STATIN void __wt_cell_unpack(WT_CELL *, WT_CELL_UNPACK *); -STATIN int __wt_cell_unpack_safe(WT_CELL *, WT_CELL_UNPACK *, uint8_t *); - /* * WT_CELL -- * Variable-length cell type. @@ -229,16 +220,6 @@ __wt_cell_type(WT_CELL *cell) } /* - * __wt_cell_unpack -- - * Unpack a WT_CELL into a structure. - */ -static inline void -__wt_cell_unpack(WT_CELL *cell, WT_CELL_UNPACK *unpack) -{ - (void)__wt_cell_unpack_safe(cell, unpack, NULL); -} - -/* * __wt_cell_unpack_safe -- * Unpack a WT_CELL into a structure during verification. */ @@ -371,3 +352,14 @@ __wt_cell_unpack_safe(WT_CELL *cell, WT_CELL_UNPACK *unpack, uint8_t *end) done: CHK(cell, unpack->len); return (0); } + +/* + * __wt_cell_unpack -- + * Unpack a WT_CELL into a structure. + */ +static inline void +__wt_cell_unpack(WT_CELL *cell, WT_CELL_UNPACK *unpack) +{ + (void)__wt_cell_unpack_safe(cell, unpack, NULL); +} + |