46 Commits

Author SHA1 Message Date
Takatoshi Kondo
17267ed475 Added -Wconversion support for C++. 2019-03-25 19:48:39 +09:00
Takatoshi Kondo
4f9ec65713 Fixed #741.
Fixed msgpack::type::tuple base class conversion.
Fixed C++03 msgpack::type::make_tuple.
2018-10-16 22:42:50 +09:00
Takatoshi Kondo
ec239933db Fixed #671.
Added STR type check to define_map.
2018-04-25 10:43:26 +09:00
Takatoshi Kondo
288a6b2e31 Fixed zone expansion algorithm. 2017-07-23 19:12: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
e90231c865 Added 'fallthrough' comments to suppress gcc7 warnings. 2017-04-24 17:16:43 +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
523e986077 Added size_equal_only support for C++03 msgpack::type::tuple. 2016-06-20 18:39:04 +09:00
Takatoshi Kondo
4ffdc01135 Added converting support for different size tuples. 2016-06-20 17:12:53 +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
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
fe229d1df0 Fixed #440.
Fixed a pointer operation problem at msgpack::zone::chunk_list::clear().
It was only happened on C++03.
2016-03-12 11:39:38 +09:00
Takatoshi Kondo
54cb4350b3 Re-organized tree to prepare for version 2.0.0.
See https://github.com/msgpack/msgpack-c/wiki/v1_1_cpp_versioning
2016-01-31 19:28:31 +09:00
Takatoshi Kondo
ba15089d86 Version 1.3.0.
Updated the license from the license from the Apache License Version 2.0
to the Boost Software License, Version 1.0.
Removed unused files.
2015-11-21 12:41:46 +09:00
Takatoshi Kondo
4b2b3a18df Added Boost.Preprocessor as a submodule.
Replaced boost/ with msgpack/ and BOOST with MSGPACK in Boost.Preprocessor files.
Renamed existing macron in versioning.hpp to avoid confict with MSGPACK_PP_*.
Removed MSGPACK_USE_BOOST requirement from MSGPACK_DEFINE_MAP.
2015-08-11 16:32:24 +09:00
Takatoshi Kondo
a35fe57737 Added BOOST_PP_VARIADICS checking to avoid multiple definition. 2015-07-15 13:54:55 +09:00
Takatoshi Kondo
584bd8575f Added the comment for BOOST_PP_VARIADICS define. 2015-07-05 09:23:43 +09:00
Takatoshi Kondo
777e5f13f3 Added map-based class pack/convert support. 2015-07-05 09:23:43 +09:00
Takatoshi Kondo
55d09e6c30 Added 'inline' to make_define(). 2015-06-18 12:55:19 +09:00
Takatoshi Kondo
e18f5b2d52 Added a clone function for msgpack::object.
The function prepares zone's chunk that has minimal size to deep copy.
2015-05-21 14:44:40 +09:00
Takatoshi Kondo
7cd77292fc Refined base class pack/unpack support.
Not only C++11 but also C++03 supported.
2015-05-01 22:05:23 +09:00
Takatoshi Kondo
904dd65965 Merge branch 'fix_doxygen_support' of https://github.com/redboltz/msgpack-c into redboltz-fix_doxygen_support
# Conflicts:
#	erb/cpp03_define.hpp.erb
#	erb/cpp03_msgpack_tuple.hpp.erb
#	erb/cpp03_msgpack_tuple_fwd.hpp.erb
#	include/msgpack/adaptor/bool_fwd.hpp
#	include/msgpack/adaptor/char_ptr_fwd.hpp
#	include/msgpack/adaptor/cpp11/array.hpp
#	include/msgpack/adaptor/cpp11/array_char.hpp
#	include/msgpack/adaptor/cpp11/array_char_fwd.hpp
#	include/msgpack/adaptor/cpp11/array_fwd.hpp
#	include/msgpack/adaptor/cpp11/forward_list.hpp
#	include/msgpack/adaptor/cpp11/forward_list_fwd.hpp
#	include/msgpack/adaptor/cpp11/tuple_fwd.hpp
#	include/msgpack/adaptor/cpp11/unordered_map.hpp
#	include/msgpack/adaptor/cpp11/unordered_map_fwd.hpp
#	include/msgpack/adaptor/cpp11/unordered_set.hpp
#	include/msgpack/adaptor/cpp11/unordered_set_fwd.hpp
#	include/msgpack/adaptor/deque_fwd.hpp
#	include/msgpack/adaptor/detail/cpp03_define.hpp
#	include/msgpack/adaptor/detail/cpp03_msgpack_tuple.hpp
#	include/msgpack/adaptor/detail/cpp03_msgpack_tuple_fwd.hpp
#	include/msgpack/adaptor/detail/cpp11_define.hpp
#	include/msgpack/adaptor/detail/cpp11_msgpack_tuple_fwd.hpp
#	include/msgpack/adaptor/fixint_fwd.hpp
#	include/msgpack/adaptor/float_fwd.hpp
#	include/msgpack/adaptor/int_fwd.hpp
#	include/msgpack/adaptor/list_fwd.hpp
#	include/msgpack/adaptor/map_fwd.hpp
#	include/msgpack/adaptor/nil.hpp
#	include/msgpack/adaptor/nil_fwd.hpp
#	include/msgpack/adaptor/pair_fwd.hpp
#	include/msgpack/adaptor/raw.hpp
#	include/msgpack/adaptor/raw_fwd.hpp
#	include/msgpack/adaptor/set_fwd.hpp
#	include/msgpack/adaptor/string_fwd.hpp
#	include/msgpack/adaptor/tr1/unordered_map.hpp
#	include/msgpack/adaptor/tr1/unordered_map_fwd.hpp
#	include/msgpack/adaptor/tr1/unordered_set.hpp
#	include/msgpack/adaptor/tr1/unordered_set_fwd.hpp
#	include/msgpack/adaptor/vector.hpp
#	include/msgpack/adaptor/vector_bool_fwd.hpp
#	include/msgpack/adaptor/vector_char.hpp
#	include/msgpack/adaptor/vector_char_fwd.hpp
#	include/msgpack/adaptor/vector_fwd.hpp
2015-04-03 14:54:55 +09:00
Takatoshi Kondo
e8d3c8d6c5 Re-designed user types dispatching mechanism.
msgpakc-c 0.5.9 or older uses ADL.
msgpack-c 1.0.x uses overloading with header files ordering.
msgpack-c 1.1.x uses functor with class template specialization.
2015-04-02 18:23:37 +09:00
Takatoshi Kondo
ae5734e8d1 Recovered a minimal support for Doxygen.
Removed MSGPACK_API_VERSION_NAMESPACE(v1) from doxygen build.
It seems that Doxygen cannot parse a complicated macro such as MSGPACK_API_VERSION_NAMESPACE.

Added EXTRACT_ALL=YES to Doxyfle.
Added INPUT configuration variable that is point to include directory to Doxyfile.
2015-03-31 16:26:27 +09:00
Takatoshi Kondo
ad5da7f131 Added msgpack prefix to erb template files.
The files that are generated by preprocess have already have the prefix.
2015-03-11 10:35:23 +09:00
Takatoshi Kondo
0d9a21ea08 Added msgpack prefix to packer. 2015-03-08 20:49:40 +09:00
Takatoshi Kondo
f399ec8c30 Added msgpack prefix to support API versioning. 2015-03-07 22:58:45 +09:00
Takatoshi Kondo
c4fb47c00d Fixed #204, #202.
enum support had been incomplete.
This fix made enum support complete.

Replaced int with auto on c++11 scoped enum.
Replaced template specializations with function overloads on operator<< and operator>> for enum.

enum can convert to object with and without zone.

When you want to adapt enum, you need to write as follows:

// NOT msgpack.hpp

enum yourenum {
    elem
};

MSGPACK_ADD_ENUM(yourenum);

// msgpack.hpp should be included after MSGPACK_ADD_ENUM(...)

int main() {
    msgpack::object obj(yourenum::elem);
}
2015-01-31 22:19:31 +09:00
Nobuyuki Kubota
3bdf646cc6 Merge pull request #192 from redboltz/fix_issue_190
Fixed #190.
2015-01-16 20:05:39 +09:00
Takatoshi Kondo
7f48ddc85e Fixed #190.
Supressed warnings on MSVC.
2015-01-15 20:42:33 +09:00
Takatoshi Kondo
fe4af1125d 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.
2015-01-03 10:22:58 +09:00
Takatoshi Kondo
240b02174d Fixed zone allocate alignment problem. 2014-12-05 20:46:56 +09:00
Takatoshi Kondo
dab725624e Made copy constructors and copy assignment operators private for classes that should be noncopyable. 2014-11-23 20:42:38 +09:00
Takatoshi Kondo
d6cc5494a9 Fixed memory size caluclation problem.
See https://github.com/msgpack/msgpack-c/issues/149
2014-11-01 19:41:47 +09:00
Takatoshi Kondo
b5e66150e9 Minimized header files dependency.
Added help comments for typical compile error.
2014-10-19 21:18:30 +09:00
Takatoshi Kondo
db8578a62b Separated adaptor functions' definitions and declarations. 2014-10-16 11:21:26 +09:00
Takatoshi Kondo
4c00f448aa Added a minimal forward declaration header file for pack/unpack overloading. 2014-10-01 14:33:02 +09:00
Takatoshi Kondo
3ddeb08e6e Added API versioning. 2014-10-12 23:21:25 +09:00
Takatoshi Kondo
5896ff3746 Fixed -Wextra warnings on gcc. 2014-09-02 18:15:58 +09:00
Takatoshi Kondo
68bf4acb4b Fixed operator>>(object const& o, various types& v) return type and value problem.
https://github.com/msgpack/msgpack-c/issues/105
2014-08-29 00:43:18 +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
17e696fc0d Removed redundant memory allocation from zone.
Removed zone::create and zone::destroy.
We can use zone as follows:
   zone z; // on stack
   zone* z = new zone; // on heap

Fixed a resource leak when zone::push_finalizer(msgpack::unique_ptr<T>) is called.
2014-08-07 15:23:34 +09:00
Takatoshi Kondo
ce21ab0ebf Fixed zone allocating functions always throw std::bad_alloc() if allocation is failed. 2014-08-06 12:16:28 +09:00
Takatoshi Kondo
b0df21295c Untabified.
Adjust line break positions.
2014-07-12 00:17:31 +09:00
Takatoshi Kondo
0889e6117e Renamed member variables name. 2014-07-11 23:37:43 +09:00
Takatoshi Kondo
bc33317b7e Reorganized tree. 2014-07-07 16:31:29 +09:00