From 2865a96ba568388b953a4dc84125dee5c84423f7 Mon Sep 17 00:00:00 2001 From: Takatoshi Kondo Date: Thu, 21 Jan 2016 14:10:00 +0900 Subject: [PATCH] Fixed existing code compile error problem. Changed macro name from MSGPACK_USE_LEGACY_NIL to MSGPACK_DISABLE_LEGACY_NIL. msgpack-c shouldn't make compile error on existing codes by default without major version up. So if you want to disable msgpack::type::nil, you need to define MSGPACK_DISABLE_LEGACY_NIL macro. --- include/msgpack/adaptor/nil.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/msgpack/adaptor/nil.hpp b/include/msgpack/adaptor/nil.hpp index e7f93d10..ebecb414 100644 --- a/include/msgpack/adaptor/nil.hpp +++ b/include/msgpack/adaptor/nil.hpp @@ -23,11 +23,11 @@ namespace type { struct nil_t { }; -#if defined(MSGPACK_USE_LEGACY_NIL) +#if !defined(MSGPACK_DISABLE_LEGACY_NIL) typedef nil_t nil; -#endif // defined(MSGPACK_USE_LEGACY_NIL) +#endif // !defined(MSGPACK_DISABLE_LEGACY_NIL) inline bool operator<(nil_t const& lhs, nil_t const& rhs) { return &lhs < &rhs;