mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 18:29:53 +00:00
c++: fix object >> std::string
This commit is contained in:
parent
a62a5d6c69
commit
92952f6566
4 changed files with 3 additions and 6 deletions
|
|
@ -26,9 +26,8 @@ namespace msgpack {
|
|||
|
||||
inline std::string& operator>> (object o, std::string& v)
|
||||
{
|
||||
type::raw_ref r;
|
||||
o >> r;
|
||||
v.assign(r.ptr, r.size);
|
||||
if(o.type != type::RAW) { throw type_error(); }
|
||||
v.assign(o.via.raw.ptr, o.via.raw.size);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue