282 Commits

Author SHA1 Message Date
Takatoshi Kondo
7ad743f2da Fixed conflict between boost fusion sequence and std::tuple/std::pair. 2017-07-26 10:24:17 +09:00
Takatoshi Kondo
354ee5b9a3 Merge branch 'alignment' of https://github.com/chshaob1/msgpack-c into chshaob1-alignment 2017-07-22 15:28:12 +09:00
Takatoshi Kondo
56db4475f2 Fixed msvc2015. 2017-07-04 07:44:03 +09:00
Takatoshi Kondo
7024a1ec2c Merge pull request #607 from redboltz/fix_597
Solved #597.
2017-06-15 20:38:22 +09:00
Takatoshi Kondo
ca4a425a52 Merge pull request #602 from redboltz/fix_600
Fixed #600.
2017-06-15 16:08:24 +09:00
Takatoshi Kondo
a502097fd0 Solved #597.
Added `std::optional` and `std::string_view` adaptors.
2017-06-13 18:22:48 +09:00
Takatoshi Kondo
ffcaaeb482 Fixed #600.
Added `maybe-uninitialized` warning suppression code.
2017-06-12 15:33:05 +09:00
Takatoshi Kondo
684c5e0bb0 Suppressed gcc 7.1 maybe-uninitialized warning.
When I execute cmake `-DMSGPACK_CXX11=OFF`, gcc 7.1 reports the warning.
I've already added the warning suppression pragma, but it doesn't work
in this case. So I added explicit initializing code even if it is redundant.
2017-06-12 14:11:21 +09:00
Takatoshi Kondo
a7a78bde9b Fixed #598. 2017-06-08 09:26:05 +00:00
Stefan Herbrechtsmeier
3d82c2d651 Add cmake package config support
Add support for CMake find_package command to msgpack. The package
exports the two targets msgpackc-static and msgpackc if shared is
enabled. The CMake find_package command works after installation
of msgpack and during build of another project which adds msgpack
as sub project via add_subdirectory command.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2017-04-04 08:33:18 +02:00
Takatoshi Kondo
4df2bdecda Fixed #536.
Replaced __GNUC_MINOR__ 6 with 7 for suppress maybe-uninitialized.
2017-03-15 21:30:07 +09:00
Takatoshi Kondo
1f515b3ae7 Added boost string_view adaptor. 2017-01-15 19:09:31 +09:00
Takatoshi Kondo
84ad9a2634 Added Spirit.X3 based parse.
It uses iterator pair instead of data and size.
2017-01-05 21:24:25 +09:00
Takatoshi Kondo
c55f778198 Fixed #534.
Added conditional [[deprecated]] attribute.
Updated zlib version.
2017-01-02 20:40:34 +09:00
Takatoshi Kondo
22780a6808 Suppressed maybe uninitialized warnings. 2016-12-11 15:54:27 +09:00
Luiz Silva
04b549a46b Replace c-Style cast with static_cast 2016-11-16 11:00:28 -02:00
Luiz Silva
4a1db60af8 Fix compilation with Gtest 1.8.0 and GCC 5.4.1 2016-11-10 10:59:26 -02:00
Takatoshi Kondo
a97c00e463 Added msgpack::object cheking code before covert it. 2016-11-02 08:53:14 +09:00
Takatoshi Kondo
e61cd76310 Supported any names for MSGPACK_DEFINE_MAP using MSGPACK_NVP. 2016-10-30 16:25:19 +09:00
Beilu Shao
b4786711df alignment: use proper alignment size
Pass proper alignment size when use allocate_align(). This will
fix alignment trap issues on ARM.

Signed-off-by: Beilu Shao <beilushao@gmail.com>
2016-10-16 23:59:13 +02:00
Takatoshi Kondo
ccc9ac5538 Fixed #521.
Introduced new object type `FLOAT32` and `FLOAT64`.
`FLOAT64` is equivalent to `FLOAT`.
The both internal expressions are f64(double).
2016-10-11 23:23:06 +09:00
Takatoshi Kondo
baea172cc9 Fixed #519.
Suppressed maybe unused warnings.
2016-10-09 12:06:35 +09:00
Eduardo Silva
da46fb1ef7 test: c: add test for new msgpack_unpacker_next_with_size()
Signed-off-by: Eduardo Silva <eduardo@treasure-data.com>
2016-09-07 16:24:52 -06:00
Takatoshi Kondo
5d69c22bf9 Use OR instead of AND for all classes that have multiple types.
Revert example. Combination of has_as and not has_as are move to tests.
2016-08-29 22:12:01 +09:00
Takatoshi Kondo
73af452ed8 Fixed #507.
Removed -Wno-mismatched-tags option from g++.
g++ doesn't support the option and doesn't care the mismatch originally.
2016-07-29 19:49:53 +09:00
Takatoshi Kondo
523e986077 Added size_equal_only support for C++03 msgpack::type::tuple. 2016-06-20 18:39:04 +09:00
Takatoshi Kondo
90c2e35694 Fixed warnings on clang on OSX. 2016-06-20 17:30:51 +09:00
Takatoshi Kondo
4ffdc01135 Added converting support for different size tuples. 2016-06-20 17:12:53 +09:00
Takatoshi Kondo
1b87018a0a Fixed #390.
Added size_equal_only class template to check converted container size
strictly.
Relaxed std::array size checking by default.
Fixed std::tuple and msgpack::type::tuple size checking problem.
2016-06-20 15:32:24 +09:00
Takatoshi Kondo
20e777c1fa Merge pull request #487 from ys-nuem/support-mingw
Add missing platform detection in examples/test
2016-06-19 18:55:43 +09:00
Yusuke Sasaki
b4c4c213b1 Add missing platform detection in examples/test 2016-06-18 03:38:42 +09:00
Takatoshi Kondo
0f66e144ab Support MSVC cli.
MSVC CLI defined their own nullptr and provides for __nullptr for standard C++11.
https://msdn.microsoft.com/en-us/library/4ex65770.aspx
msgpack-c introduce MSGPACK_NULLPTR for internal use, it is defined as __nullptr only if compiled on C++ CLI otherwise defined as nullptr.
2016-06-08 18:03:51 +09:00
Takatoshi Kondo
4ee616bbde Removed autotools and msvc files.
Please use cmake.
2016-06-05 21:54:59 +09:00
Takatoshi Kondo
22613d4dd0 Merge pull request #464 from redboltz/fix_463
Fixed #463.
2016-05-24 08:22:50 +09:00
Takatoshi Kondo
d15d9220ff Merge pull request #461 from redboltz/add_unpack_visitor_api
Added a visitor version of unpack API,
2016-05-22 22:50:44 +09:00
Takatoshi Kondo
cc02da0ccf Fixed #465
Added C-Style array support.

Existing mapping:
  convert:
  pack:
    char[N]       => STR
    const char[N] => STR
  object:
    char[N]       => STR (v1 only)
    const char[N] => STR (v1 only)
  object_with_zone:
    char[N]       => STR
    const char[N] => STR

Additional mapping:

  convert:
    STR        => char[N]
    ARRAY      => T[N]
  pack:
    T[N]       => ARRAY
    const T[N] => ARRAY
  object:
  object_with_zone:
    T[N]       => ARRAY
    const T[N] => ARRAY
2016-05-16 23:00:30 +09:00
Takatoshi Kondo
e6f82cf2bb Fixed #463.
Added lacked include files.
Added a test.
Added MSVC build settings on appveyor.
Added old MSVC workaround.
Fixed a variable definition point to meet ANSI-C.
2016-05-14 22:05:10 +09:00
Takatoshi Kondo
6593cba284 Fixed end_map_value() calling point.
Renamed names that related to a visitor.
Renamed test name from json to json_like because I omit escape.
Added end_map_value() and end_map() implementation.
2016-05-05 18:44:56 +09:00
Takatoshi Kondo
d5b515899c Added a visitor version of unpack API,
The current unpacking APIs are constructed on the visitor mechanism.
(Fixed #418)

Updated test condition.
2016-05-01 21:44:03 +09:00
Takatoshi Kondo
db90ee4283 Removed obsolete unpack() API. 2016-03-26 11:46:45 +09:00
Takatoshi Kondo
31a06a0682 Removed obsolete APIs form v2.
Removed MSGPACK_DISABLE_LEGACY_CONVERT from v2. Those APIs are removed
from v2.
2016-03-25 09:16:27 +09:00
Takatoshi Kondo
1bfcf55469 Replaced msgpack::unpacked with msgpack::object_handle.
msgpack::unpacked is a typedef of the msgpack::object_handle.
I recommend using msgpack::object_handle. It can be used not only
holding unpacked msgpack objects but also msgpack::objects that are
created by any types.

Replaced unpack() APIs in test codes and examples. They used to use old
APIs.
2016-03-21 15:22:50 +09:00
Takatoshi Kondo
d8e9941fa9 Merge pull request #434 from redboltz/fix_417
Fix 417
2016-03-02 09:56:53 +09:00
Takatoshi Kondo
60d4b2833d Fixed #433.
Added zero size check before calling std::vector<T>::front().
Added empty checking tests for all containers.
2016-02-26 15:08:18 +09:00
Takatoshi Kondo
1244edeaf1 Removed the test that uses msgpack::object with std::string on version 1.x. 2016-02-26 13:52:14 +09:00
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
ed5a4123b5 Replaced nil with nil_t.
Added nil typedef for existing codes.
2016-01-18 22:12:38 +09:00
Takatoshi Kondo
c2f523e463 Merge branch 'fix_382' of https://github.com/redboltz/msgpack-c into redboltz-fix_382 2016-01-15 12:44:40 +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