33 Commits

Author SHA1 Message Date
Takatoshi Kondo 3c271892e3 Fixed #399
If MSGPACK_DISABLE_LEGACY_CONVERT is defined, msgpack::object::convert(T*) is removed.
Added MSGPACK_DISABLE_LEGACY_CONVERT to build system and documents.

Please define MSGPACK_DISABLE_LEGACY_CONVERT and update your code as follows:
Replace
  int i;
  obj.convert(&i); // Removed pointer version
with
  int i;
  obj.convert(i);  // Reference version
2016-01-21 22:28:53 +09:00
Takatoshi Kondo ba73841240 Added MSGPACK_DISABLE_LEGACY_NIL to build system and documents. 2016-01-21 20:47:16 +09:00
Takatoshi Kondo c06d4d70ef Fixed #395
libmsgpack.[a|so] is the library file for C++.
libmsgpackc.[a|so] is the library file for C.
Since version 1.0.0, the C++ parts of msgpack-c is a header only
library. So libmsgpack.* shouldn't be generated.

On the autotools building environment, removed libmsgpack.*
generation. On the cmake building environment, replaced libmsgpack.*
with libmsgpackc.* and set so-version to 2.0.0.
2016-01-14 07:59:37 +09:00
Takatoshi Kondo 428780db53 Added std::reference_wrapper packing and making object and object_with_zone support.
Fixed #370.
2015-10-09 15:45:29 +09:00
Nobuyuki Kubota 2b38389f68 Add missing files to Makefile.am 2015-09-04 19:18:23 +09:00
Nobuyuki Kubota 93142323f0 Merge pull request #349 from redboltz/variant
Variant
2015-09-04 18:42:47 +09:00
Takatoshi Kondo 96f145812f Fixed #243.
std::vector<unsigned char> and std::array<unsigned char> are mapped to BIN.
std::vector<uint8_t> and std::array<uint8_t> are mapped to BIN if uint8_t is the same type of unsigned char, otherwise mapped to ARRAY.

Added array_ref. When client wraps BIN mapped types above with array_ref as msgpack::type::array_ref<std::vector<char> >, the type is mapped to ARRAY.
2015-08-31 14:06:39 +09:00
Takatoshi Kondo cd9d6c5940 Added msgpack::type::variant and msgpack::type::variant_ref that is based on boost::variant.
You can convert to those types from any msgpack objects.
2015-08-18 17:47:27 +09:00
Takatoshi Kondo d4199b59f9 Added osx support on travis-ci. 2015-08-05 13:49:15 +09:00
Takatoshi Kondo db588909b9 Added std::shared_ptr and std::unique_ptr adaptors. 2015-07-31 12:39:11 +09:00
Takatoshi Kondo 1a97e761fb Fixed merge mistake. 2015-07-06 16:00:06 +09:00
Takatoshi Kondo 188c0a9a6b Merge branch 'add_define_map' of https://github.com/redboltz/msgpack-c into redboltz-add_define_map 2015-07-06 14:18:21 +09:00
Takatoshi Kondo ab438ac9b9 Added multi files that includes msgpack.hpp linking test.
It detects a lack of inline keyword in a function definition.
2015-07-06 12:33:00 +09:00
Takatoshi Kondo a37e7232c7 Merge pull request #305 from redboltz/add_boost_fusion
Added Boost.Fusion support.
2015-07-05 10:34:06 +09:00
Takatoshi Kondo 777e5f13f3 Added map-based class pack/convert support. 2015-07-05 09:23:43 +09:00
Takatoshi Kondo 57ba93a2b2 Added Boost.Fusion support.
Fusion sequences can be serialized.
2015-07-01 15:07:45 +09:00
Takatoshi Kondo 34a42415be Added v4(old) raw packing support. 2015-06-30 15:11:51 +09:00
Takatoshi Kondo 70fbae3c5f Added Boost.StringRef support. 2015-05-02 11:02:57 +09:00
Takatoshi Kondo 92a7f3f794 Fixed #273
msgpack::object stream outputs became JSON format.
2015-04-22 14:59:02 +09:00
Takatoshi Kondo ef09252dff Added the Boost.Optional adaptor.
It is enables when MSGPACK_USE_BOOST is defined.
2015-04-09 14:46:06 +09:00
Mizuki Hirata 97886c50e7 Fixed iterator test case. 2015-02-02 15:27:15 +09:00
Mizuki Hirata 327b0db626 Added versioning namespace and test case to iterator. 2015-02-02 15:27:15 +09:00
Takatoshi Kondo 309e96087a - Added unpack limit.
- Added new exceptions to explain limit over errors.

- Fixed ext maximum size problem.
Problem:
The type of m_trail was uint32_t but when parsing ext, it could be 0xffffffff + 1. +1 means type. See https://github.com/msgpack/msgpack/blob/master/spec.md#ext-format-family

Solution:
Modified the type of m_trail as std::size_t. If sizeof(std::size_t) == 4, 0xffffffff size of ext is an error. If sizeof(std::size_t) == 8, 0xffffffff size of ext is not an error. m_trail is 0xffffffff + 1.

Design cohice:
I chose std::size_t as the m_trail's type instead of uint64_t intentionally. On 64 addressing bit environment, there is no problem. On 32 bit environment, there is no problem except ext with maximum size. There is only one exception in the all msgpack format. Using uint64_t to support that, it's very expensive. On 32 addressing bit environment, allocating 0xffffffff + 1 bytes of memory couldn't succeed, so I believe that throwing an exception is a reasonable design choice in the case.
2014-12-14 19:10:46 +09:00
Takatoshi Kondo 4fcb4777f3 Added additional unpack() APIs to support C++11 style programming. 2014-09-15 22:33:23 +09:00
Takatoshi Kondo 6a8412d6de Separated msgpack_test.cpp.
Renamed test files.
Decreased test's loop counter to avoid travis-ci no output timeout.
The number of loops is not so meaningful.
2014-09-09 14:15:21 +09:00
Takatoshi Kondo f969f6f39c Replaced zone* member variable in object with zone&.
Added msgpack::object::with_zone tests.
Added tuples operator<<'s parameter to const.
Fixed array object::with_zone pointer and size unset problem.
Fixed forward_list object::with_zone pointer and size unset problem.
2014-08-11 13:23:27 +09:00
Takatoshi Kondo 8920c49597 Unified test files extension as cpp. 2014-08-11 09:01:17 +09:00
Takatoshi Kondo 0bc4b3f599 Added the C++11 std::array support.
std::array<char, N> is mapped to BIN. That is the same mannar as std::vector.
2014-08-10 23:06:30 +09:00
Takatoshi Kondo 0a99b9f933 Fixed the problem that reference function doesn't pass correctly.
Fixed referenced flag writing timing on next(). It should place before flush.
Added msgpack_tuple test for CMakeLists.txt
Untabified CMakeLists.txt
Added reference function test.
2014-08-07 23:26:09 +09:00
Takatoshi Kondo bc33317b7e Reorganized tree. 2014-07-07 16:31:29 +09:00
Takatoshi Kondo da601e4589 Added member fucntion version of msgpack::type::tuple::get().
Added support functions for msgpack::type::tuple as same as std::tuple.
2014-07-07 16:17:58 +09:00
Takatoshi Kondo 5a9f89ae1f Added libgtest.a for make check 2013-10-29 13:35:26 +09:00
FURUHASHI Sadayuki b463d9b687 reorganized tree 2013-01-03 19:13:28 -08:00