Replace MDB_node.mn_offset[], to ease debugging.

vmware
Hallvard Furuseth 11 years ago
parent 2ce9ffa003
commit a2ed03642c
  1. 8
      libraries/liblmdb/mdb.c

@ -701,9 +701,11 @@ typedef struct MDB_node {
* They are in host byte order in case that lets some * They are in host byte order in case that lets some
* accesses be optimized into a 32-bit word access. * accesses be optimized into a 32-bit word access.
*/ */
#define mn_lo mn_offset[BYTE_ORDER!=LITTLE_ENDIAN] #if BYTE_ORDER == LITTLE_ENDIAN
#define mn_hi mn_offset[BYTE_ORDER==LITTLE_ENDIAN] /**< part of dsize or pgno */ unsigned short mn_lo, mn_hi; /**< part of data size or pgno */
unsigned short mn_offset[2]; /**< storage for #mn_lo and #mn_hi */ #else
unsigned short mn_hi, mn_lo;
#endif
/** @defgroup mdb_node Node Flags /** @defgroup mdb_node Node Flags
* @ingroup internal * @ingroup internal
* Flags for node headers. * Flags for node headers.

Loading…
Cancel
Save