mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-28 23:24:11 +02:00
Fixed msgpack::object type EXT comparison problem.
Added msgpack::object type EXT ostream minimal output.
This commit is contained in:
parent
0bc4b3f599
commit
e217e72c22
@ -252,8 +252,8 @@ inline bool operator==(const object& x, const object& y)
|
||||
memcmp(x.via.bin.ptr, y.via.bin.ptr, x.via.bin.size) == 0;
|
||||
|
||||
case type::EXT:
|
||||
return x.via.bin.size == y.via.bin.size &&
|
||||
memcmp(x.via.bin.ptr, y.via.bin.ptr, x.via.bin.size) == 0;
|
||||
return x.via.ext.size == y.via.ext.size &&
|
||||
memcmp(x.via.ext.ptr, y.via.ext.ptr, x.via.ext.size) == 0;
|
||||
|
||||
case type::ARRAY:
|
||||
if(x.via.array.size != y.via.array.size) {
|
||||
@ -517,6 +517,8 @@ inline std::ostream& operator<< (std::ostream& s, const object& o)
|
||||
(s << '"').write(o.via.bin.ptr, o.via.bin.size) << '"';
|
||||
break;
|
||||
|
||||
case type::EXT:
|
||||
s << "EXT";
|
||||
|
||||
case type::ARRAY:
|
||||
s << "[";
|
||||
@ -558,4 +560,3 @@ inline std::ostream& operator<< (std::ostream& s, const object& o)
|
||||
#include "msgpack/type.hpp"
|
||||
|
||||
#endif /* msgpack/object.hpp */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user