mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-21 23:56:55 +02:00
Merge branch 'add_msgpack_prefix'
Conflicts: include/msgpack/adaptor/char_ptr.hpp include/msgpack/adaptor/cpp11/array.hpp include/msgpack/adaptor/cpp11/array_char.hpp include/msgpack/adaptor/cpp11/tuple.hpp include/msgpack/adaptor/cpp11/unordered_map.hpp include/msgpack/adaptor/cpp11/unordered_set.hpp include/msgpack/adaptor/deque.hpp include/msgpack/adaptor/list.hpp include/msgpack/adaptor/map.hpp include/msgpack/adaptor/set.hpp include/msgpack/adaptor/string.hpp include/msgpack/adaptor/tr1/unordered_map.hpp include/msgpack/adaptor/tr1/unordered_set.hpp include/msgpack/adaptor/vector.hpp include/msgpack/adaptor/vector_char.hpp include/msgpack/object.hpp include/msgpack/unpack.hpp
This commit is contained in:
@@ -29,7 +29,7 @@ namespace msgpack {
|
||||
MSGPACK_API_VERSION_NAMESPACE(v1) {
|
||||
|
||||
template <typename Stream>
|
||||
inline packer<Stream>& operator<< (packer<Stream>& o, const char* v)
|
||||
inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const char* v)
|
||||
{
|
||||
uint32_t size = checked_get_container_size(std::strlen(v));
|
||||
o.pack_str(size);
|
||||
@@ -37,20 +37,20 @@ inline packer<Stream>& operator<< (packer<Stream>& o, const char* v)
|
||||
return o;
|
||||
}
|
||||
|
||||
inline void operator<< (object::with_zone& o, const char* v)
|
||||
inline void operator<< (msgpack::object::with_zone& o, const char* v)
|
||||
{
|
||||
uint32_t size = checked_get_container_size(std::strlen(v));
|
||||
o.type = type::STR;
|
||||
o.type = msgpack::type::STR;
|
||||
char* ptr = static_cast<char*>(o.zone.allocate_align(size));
|
||||
o.via.str.ptr = ptr;
|
||||
o.via.str.size = size;
|
||||
std::memcpy(ptr, v, size);
|
||||
}
|
||||
|
||||
inline void operator<< (object& o, const char* v)
|
||||
inline void operator<< (msgpack::object& o, const char* v)
|
||||
{
|
||||
uint32_t size = checked_get_container_size(std::strlen(v));
|
||||
o.type = type::STR;
|
||||
o.type = msgpack::type::STR;
|
||||
o.via.str.ptr = v;
|
||||
o.via.str.size = size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user