Takatoshi Kondo
ff86d61799
Replaced auto& with auto const& for msgpack::object.
...
Replaced auto with auto const& for msgpack::object.
Avoided msgpack::object conversion in EXPECT_EQ.
2015-02-02 15:27:15 +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
Mizuki Hirata
994144dac2
Add range-based for loop support.
2015-02-02 15:27:15 +09:00
Takatoshi Kondo
fa231139d7
Merge pull request #205 from redboltz/fix_issue_204
...
Fixed #204 , #202 .
2015-02-01 21:20:31 +09:00
Takatoshi Kondo
5cd1c6bfa1
Merge pull request #201 from redboltz/fix_issue_184
...
Added unpack function using existing zone.
2015-02-01 21:18:05 +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
Takatoshi Kondo
70e50d9679
Added unpack function using existing zone.
...
Removed redundant inline keyword form declarations.
2015-01-30 22:57:27 +09:00
Takatoshi Kondo
978e6b9057
Merge pull request #200 from anton-sergeev/master
...
Fix cmake for subproject usage
2015-01-30 21:58:32 +09:00
Anton Sergeev
571f1a27a2
Fix cmake for subproject usage
...
Signed-off-by: Anton Sergeev <Anton.Sergeev@elecard.ru>
2015-01-26 20:32:31 +06:00
Takatoshi Kondo
414da4e8c6
Merge pull request #195 from nobu-k/configure-version-fix
...
Support OS X's sed in configure.in
2015-01-17 23:43:20 +09:00
Nobuyuki Kubota
3eadb124fc
Support OS X's sed in configure.in
2015-01-16 22:15:05 +09:00
Nobuyuki Kubota
fd9eb26688
Add static inline to msgpack_zone_malloc_no_align
2015-01-16 21:47:49 +09:00
Nobuyuki Kubota
6c59e5195a
Merge branch 'fix_issue_191'
...
Conflicts:
test/streaming_c.cpp
2015-01-16 21:47:13 +09:00
Nobuyuki Kubota
3bdf646cc6
Merge pull request #192 from redboltz/fix_issue_190
...
Fixed #190 .
2015-01-16 20:05:39 +09:00
Nobuyuki Kubota
2bbf10a324
Merge pull request #181 from redboltz/change_zone_align_default
...
Modified the default value of MSGPACK_ZONE_ALIGN from sizeof(int) to siz...
2015-01-16 19:53:27 +09:00
Takatoshi Kondo
737e6703df
Fixed #191 .
...
The names of float format family are changed.
old new
dec -> f64
MSGPACK_OBJECT_DOUBLE -> MSGPACK_OBJECT_FLOAT
msgpack::type::DOUBLE -> msgpack::type::FLOAT
Client codes could have compile errors when it use dec, MSGPACK_OBJECT_DOUBLE or msgpack::type::DOUBLE.
The best way to fix such errors, update client code. If it can't, set MSGPACK_USE_LEGACY_NAME_AS_FLOAT macro.
Then both old names and new names are available.
2015-01-16 00:20:43 +09:00
Takatoshi Kondo
7f48ddc85e
Fixed #190 .
...
Supressed warnings on MSVC.
2015-01-15 20:42:33 +09:00
Takatoshi Kondo
a84f444ce2
Merge pull request #185 from bajamircea/master
...
Fix one more memory size calculation.
2015-01-06 10:20:07 +09:00
Mircea Baja
7e597779e4
Fix one more memory size calculation.
...
See https://github.com/msgpack/msgpack-c/issues/149
and the commit d6cc5494a9dd25fe640c1602cdf1b566690c9ba7
2015-01-05 21:55:57 +00:00
Takatoshi Kondo
bf8c830eef
Merge pull request #183 from spatz/patch-3
...
Comment unused variable name
2015-01-05 09:55:37 +09:00
Dror Levin
5f52ec5030
Comment unused variable name
...
Prevents unused parameter error from gcc when compiled with -Wextra.
2015-01-04 13:43:55 +02: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
Nobuyuki Kubota
ce96ca8bfc
Merge pull request #175 from redboltz/add_limit
...
- Added unpack limit.
2015-01-02 12:22:03 -08:00
Nobuyuki Kubota
57732f0c1b
Merge pull request #171 from redboltz/fixed_zone_alignment
...
Fixed zone alignment
2015-01-02 11:37:01 -08:00
Nobuyuki Kubota
7ccef5b787
Merge pull request #170 from redboltz/fixed_typo
...
Fixed typos.
2015-01-02 11:01:58 -08:00
Takatoshi Kondo
1a116fb644
Merge pull request #180 from spatz/patch-2
...
Add missing break to prevent segfault
2015-01-02 18:10:06 +09:00
Takatoshi Kondo
f79fd82953
Merge pull request #179 from spatz/patch-1
...
Move constructors and operator= should be noexcept
2015-01-02 17:53:47 +09:00
Dror Levin
b9a80697bc
Add missing break to prevent segfault
...
When printing objects with extension, falling through to type ARRAY may cause segmentation fault.
2015-01-01 15:15:47 +02:00
Dror Levin
467822c97a
Move constructors and operator= should be noexcept
2014-12-30 18:30:11 +02:00
Takatoshi Kondo
7ab7eaf61b
Merge pull request #177 from redboltz/fix_issue_176
...
Fixed https://github.com/msgpack/msgpack-c/issues/176
2014-12-22 11:27:25 +09:00
Takatoshi Kondo
3ed6b673d4
Fixed https://github.com/msgpack/msgpack-c/issues/176
...
byteswap.h is no longer included on Solaris.
2014-12-20 18:38:49 +09:00
Takatoshi Kondo
469040be6b
Fixed exceptions' interface. On the C++11, both const char* and const std::string& are supported.
...
Updated all exceptions relate to unpack take a message parameter. It is better to explain the exceptional situation in detail. So far, just passing the exceptions name.
2014-12-15 10:12:55 +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
2d61fdf865
Merge pull request #172 from bajamircea/master
...
Added check for already defined NOMINMAX
2014-12-09 22:40:36 +09:00
Mircea Baja
6e560e345a
Added check for already defined NOMINMAX
2014-12-08 21:36:26 +00:00
Takatoshi Kondo
8b796dc788
Added zone alignment tests.
2014-12-05 22:08:31 +09:00
Takatoshi Kondo
240b02174d
Fixed zone allocate alignment problem.
2014-12-05 20:46:56 +09:00
Takatoshi Kondo
38a380684e
Fixed typos.
...
The typos have been pointed out by https://github.com/msgpack/msgpack-c/pull/130
Thank you @jpetso !
2014-12-05 17:18:24 +09:00
Nobuyuki Kubota
1a615af437
Merge pull request #169 from redboltz/fix_issue_168
...
Added adaptors for the C++11 version of unordered containers.
2014-12-05 17:13:51 +09:00
Takatoshi Kondo
9162610682
Added adaptors for the C++11 version of unordered containers.
...
(Fixed https://github.com/msgpack/msgpack-c/issues/168 )
2014-12-05 15:40:33 +09:00
Nobuyuki Kubota
c52a58b322
Merge pull request #163 from redboltz/fix_144
...
Fixed https://github.com/msgpack/msgpack-c/issues/144
2014-11-26 14:21:50 -08:00
Nobuyuki Kubota
ac3433f5dd
Merge pull request #165 from redboltz/implement_non_copyable
...
Made copy constructors and copy assignment operators private for classes...
2014-11-26 14:10:10 -08: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
037b1c22dc
Fixed https://github.com/msgpack/msgpack-c/issues/144
...
This fix is ogirinally from https://github.com/msgpack/msgpack-c/pull/133
I removed raw support and added str, bin, and ext support.
2014-11-17 12:51:34 +09:00
Nobuyuki Kubota
0de0b434b3
Merge branch 'refine_non_intrusive_example'
2014-11-15 17:43:23 -08:00
Nobuyuki Kubota
7eb3d2aa59
Change the type of the return value to a const reference
2014-11-15 17:41:43 -08:00
Nobuyuki Kubota
0827d08cd7
Merge pull request #162 from redboltz/msvc_test_supported
...
Supported dll export for msvc.
2014-11-15 17:22:51 -08:00
Nobuyuki Kubota
3d20ec6f21
Merge pull request #160 from redboltz/fix_memory_allocation
...
Fixed memory size caluclation problem.
2014-11-15 17:12:23 -08:00
Takatoshi Kondo
bcdbf78542
Updated infinity test better way.
...
Added NaN tests.
2014-11-03 10:03:05 +09:00