Takatoshi Kondo
3bfd142660
Fixed https://github.com/msgpack/msgpack-c/issues/153
2014-10-31 15:50:57 +09:00
Takatoshi Kondo
d031162d96
Merge pull request #146 from redboltz/fixed_char_pack
...
Fixed char packing support.
2014-10-31 12:51:53 +09:00
Takatoshi Kondo
837c5ecfc3
Fixed char packing support.
...
See https://github.com/msgpack/msgpack-c/issues/57#issuecomment-60670037
2014-10-28 10:48:49 +09:00
Takatoshi Kondo
69b2ea4002
Added help comments for compile error.
2014-10-27 17:41:06 +09:00
Takatoshi Kondo
a6aac482dd
Merge branch 'api_versioning' of https://github.com/redboltz/msgpack-c into redboltz-api_versioning
...
Conflicts:
include/msgpack/unpack.hpp
2014-10-26 09:43:36 +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
e21e3245db
Merge pull request #138 from redboltz/move_byteswap
...
Moved include byteswap.h to sysdep.h.
2014-10-19 19:42:38 +09:00
Takatoshi Kondo
44b524529d
Merge pull request #136 from redboltz/replace_uint64_t_with_apropriate_types
...
Replaced uint64_t with apropriate types.
2014-10-19 19:26:42 +09:00
Takatoshi Kondo
fc65bc0682
Replaced tuple with std::tuple.
...
Added include file int_fwd.hpp for MSGPACK_ADD_ENUM.
2014-10-16 14:07:53 +09:00
Takatoshi Kondo
ca12e6d39d
Added packer_serializer class template declaration to object_fwd.hpp
2014-10-16 14:06:57 +09:00
Takatoshi Kondo
db8578a62b
Separated adaptor functions' definitions and declarations.
2014-10-16 11:21:26 +09:00
Takatoshi Kondo
4a292193f2
Moved include byteswap.h to sysdep.h.
...
When compiling on Mac, byteswap.h is not included.
2014-10-12 01:22:10 +09:00
Takatoshi Kondo
479d50bd93
Replaced uint64_t with apropriate types.
2014-10-11 23:45:21 +09:00
Nobuyuki Kubota
982787865f
Merge pull request #127 from redboltz/clear_set_map
...
Fixed https://github.com/msgpack/msgpack-c/issues/76
2014-10-06 15:12:20 -07: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
Nobuyuki Kubota
cd03ab62f8
Merge pull request #128 from redboltz/cpp11_unpacked_return
...
Added additional unpack() APIs to support C++11 style programming.
2014-09-16 10:06:31 -07:00
Nobuyuki Kubota
44e41efa0c
Merge pull request #126 from redboltz/add_zero_size_tuple_support
...
Added zero size tuple support.
2014-09-16 09:23:31 -07:00
Thiago de Arruda
d6122b4a18
Fix size packing/unpacking for EXT 8/16/32
...
For EXT 8/16/32, the "size" field was being incremented by 1 to account for the
type field, but according to the specification the size should only consider the
length of the data field.
2014-09-15 15:37:02 -03:00
Takatoshi Kondo
4fcb4777f3
Added additional unpack() APIs to support C++11 style programming.
2014-09-15 22:33:23 +09:00
Takatoshi Kondo
03ed30ce03
Fixed https://github.com/msgpack/msgpack-c/issues/76
...
Clear deserialized target containers.
As the result of this fix, all containers' deserialized behaviors become consistent.
2014-09-15 18:16:37 +09:00
Takatoshi Kondo
6e810df2a4
Added zero size tuple support.
2014-09-14 20:50:57 +09:00
Thiago de Arruda
dfa277a9e0
Add EXT support to C library
2014-09-08 12:11:38 -03:00
Takatoshi Kondo
7737f1cb77
Removed unused member variable.
2014-09-08 17:14:56 +09:00
Takatoshi Kondo
86ad026f11
Renamed the last digit of version string from RELEASE to REVISION.
...
Added REVISION macro and getting API.
2014-09-03 13:26:34 +09:00
Jason Newton
93d0f0bd00
inline default_reference_func to avoid multiple definition errors
2014-09-03 10:26:09 +09:00
Takatoshi Kondo
5896ff3746
Fixed -Wextra warnings on gcc.
2014-09-02 18:15:58 +09:00
Takatoshi Kondo
2103c12e05
Added char* packing support. char* is packed to STR similar as std::string.
...
See https://github.com/msgpack/msgpack-c/issues/110
2014-09-01 22:42:08 +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
4d6e9d6c05
Removed referenced member from msgpack::unpacked.
...
Added a referenced parameter to msgpack::unpack() and msgpack::unpacker::next().
msgpack::unpacked is a kind of handler that holds msgpack::object and msgpack::zone, so the size of msgpack::unpacked should be small. There is no reason to have referenced in msgpack::unpacked. msgpack user can get the same information using msgpack::unpack() and msgpack::unpacker::next().
2014-08-11 15:50:51 +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
e18102d16f
Replaced size() with std::distance.
2014-08-11 07:48:30 +09:00
Takatoshi Kondo
ea23bf843e
Added std::forward_list support.
...
Fixed cmake filename typo.
2014-08-10 23:45:50 +09:00
Takatoshi Kondo
e217e72c22
Fixed msgpack::object type EXT comparison problem.
...
Added msgpack::object type EXT ostream minimal output.
2014-08-10 23:23:52 +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
b2f5893669
Added reference to return value.
2014-08-10 22:04:31 +09:00
Takatoshi Kondo
9a1ccaf155
Merge pull request #100 from redboltz/add_vector_char_as_bin
...
vector<char> is mapped to BIN
2014-08-10 21:52:02 +09:00
Takatoshi Kondo
0201c21b9a
Added minimum copy/reference threshold.
...
Even if ref_size is given on vrefbuffer's constructor, the minimum size of vrefbuffer::ref_buffer is 10.
Because int64, uint64, and double's msgpack expression size equals 9, and those buffer is allocated on the stack internally.
2014-08-08 14:28:03 +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
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
b5b459cfca
Reordered unpack selector sequence.
2014-08-07 10:40:21 +09:00
Takatoshi Kondo
7822bc787d
Replaced switch-case and bit calculation with a table.
2014-08-07 10:28:18 +09:00
Takatoshi Kondo
1f5d6b9cac
Added EXT support.
...
Removed obsolete unpack functions.
Updated examples that no longer use obsolete functions.
Added reference checking function to unpacked. ( unpacked::referenced() )
Added std:: namespace.
Added reference or copy choice function and default behavior:
When you use unpacker, default behavior is:
STR, BIN, EXT types are always held by reference.
When you don't use unpacker, default behavior is:
STR, BIN, EXT types are always held by copy.
The memory is allocated from zone.
You can customize the behavior passing your custom judging function to unpack() or unpacker's constructor.
2014-08-06 16:18:37 +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
15a0d61a64
Added the new mapping:
...
std::vector<char> is mapped to BIN.
So, currently BIN, STR, and ARRAY mappings are as follows:
std::vector<char> is mapped to BIN
std::string is mapped to STR
std::vector<T> is mapped to ARRAY // T is not char
2014-08-04 15:14:39 +09:00
Takatoshi Kondo
fd566afeb4
Added reference version of unpacker::next().
2014-08-04 00:52:04 +09:00
Takatoshi Kondo
e4d32b176e
Use const char* version of msgpack::unpack_error to avoid std::string memory allocation when usr C++11 compiler.
...
See http://www.cplusplus.com/reference/stdexcept/runtime_error/?kw=runtime_error
2014-08-03 17:04:46 +09:00
Takatoshi Kondo
b27c87c9ed
Replaced C-Style cast with static_cast.
2014-08-03 16:38:58 +09:00
Takatoshi Kondo
3729f334a1
Replaced size_t with std::size_t.
2014-08-03 16:34:47 +09:00
Takatoshi Kondo
78e8cbdfb5
Cleaned up pointer and reference versions of unpack().
2014-08-03 07:09:03 +09:00