From 1576cde59276c7157ecaebdb24470667bd743271 Mon Sep 17 00:00:00 2001 From: Igor Kostenko Date: Tue, 5 May 2015 17:39:16 +0100 Subject: [PATCH] Fix alignment of 64bit platforms --- include/rapidjson/rapidjson.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/rapidjson/rapidjson.h b/include/rapidjson/rapidjson.h index 0c41ab6..b06e82b 100644 --- a/include/rapidjson/rapidjson.h +++ b/include/rapidjson/rapidjson.h @@ -241,8 +241,12 @@ alignment. User can customize by defining the RAPIDJSON_ALIGN function macro., */ #ifndef RAPIDJSON_ALIGN +#if RAPIDJSON_64BIT == 1 +#define RAPIDJSON_ALIGN(x) ((x + 7u) & ~7u) +#else #define RAPIDJSON_ALIGN(x) ((x + 3u) & ~3u) #endif +#endif /////////////////////////////////////////////////////////////////////////////// // RAPIDJSON_UINT64_C2