mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-06-26 06:25:22 +02:00
Merge pull request #995 from sukidog/cpp_master_issue_994
Cpp master issue 994
This commit is contained in:
commit
59f2da6a3b
@ -466,12 +466,17 @@ struct object_stringize_visitor {
|
||||
m_os << '"';
|
||||
return true;
|
||||
}
|
||||
bool visit_bin(const char* v, uint32_t size) {
|
||||
(m_os << '"').write(v, static_cast<std::streamsize>(size)) << '"';
|
||||
bool visit_bin(const char* /*v*/, uint32_t size) {
|
||||
m_os << "\"BIN(size:" << size << ")\"";
|
||||
return true;
|
||||
}
|
||||
bool visit_ext(const char* /*v*/, uint32_t /*size*/) {
|
||||
m_os << "EXT";
|
||||
bool visit_ext(const char* v, uint32_t size) {
|
||||
if (size == 0) {
|
||||
m_os << "\"EXT(size:0)\"";
|
||||
}
|
||||
else {
|
||||
m_os << "\"EXT(type:" << static_cast<int>(v[0]) << ",size:" << size - 1 << ")\"";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool start_array(uint32_t num_elements) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user