From fe4af1125d43427a2c3ee146bf129ccbdc6f61a1 Mon Sep 17 00:00:00 2001 From: Takatoshi Kondo Date: Sat, 3 Jan 2015 10:22:58 +0900 Subject: [PATCH] Modified the default value of MSGPACK_ZONE_ALIGN from sizeof(int) to sizeof(void*). On the x64 environment, sizeof(int) == 4 but pointer size is 8. The latter is suitable for the default value. --- erb/cpp03_zone.hpp.erb | 2 +- include/msgpack/detail/cpp03_zone.hpp | 2 +- include/msgpack/detail/cpp11_zone.hpp | 2 +- include/msgpack/zone.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erb/cpp03_zone.hpp.erb b/erb/cpp03_zone.hpp.erb index f8f96cf1..4b55eedf 100644 --- a/erb/cpp03_zone.hpp.erb +++ b/erb/cpp03_zone.hpp.erb @@ -29,7 +29,7 @@ #endif #ifndef MSGPACK_ZONE_ALIGN -#define MSGPACK_ZONE_ALIGN sizeof(int) +#define MSGPACK_ZONE_ALIGN sizeof(void*) #endif <% GENERATION_LIMIT = 15 %> diff --git a/include/msgpack/detail/cpp03_zone.hpp b/include/msgpack/detail/cpp03_zone.hpp index 880544c1..45306b6f 100644 --- a/include/msgpack/detail/cpp03_zone.hpp +++ b/include/msgpack/detail/cpp03_zone.hpp @@ -29,7 +29,7 @@ #endif #ifndef MSGPACK_ZONE_ALIGN -#define MSGPACK_ZONE_ALIGN sizeof(int) +#define MSGPACK_ZONE_ALIGN sizeof(void*) #endif diff --git a/include/msgpack/detail/cpp11_zone.hpp b/include/msgpack/detail/cpp11_zone.hpp index e18a6cdc..632dd10a 100644 --- a/include/msgpack/detail/cpp11_zone.hpp +++ b/include/msgpack/detail/cpp11_zone.hpp @@ -31,7 +31,7 @@ #endif #ifndef MSGPACK_ZONE_ALIGN -#define MSGPACK_ZONE_ALIGN sizeof(int) +#define MSGPACK_ZONE_ALIGN sizeof(void*) #endif namespace msgpack { diff --git a/include/msgpack/zone.h b/include/msgpack/zone.h index 572185ce..62ea2bf5 100644 --- a/include/msgpack/zone.h +++ b/include/msgpack/zone.h @@ -89,7 +89,7 @@ void msgpack_zone_clear(msgpack_zone* zone); #ifndef MSGPACK_ZONE_ALIGN -#define MSGPACK_ZONE_ALIGN sizeof(int) +#define MSGPACK_ZONE_ALIGN sizeof(void*) #endif MSGPACK_DLLEXPORT