mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 10:19:51 +00:00
cpp: bool operator==(object& x, const T& y)
This commit is contained in:
parent
4e85ebbf98
commit
01b6673528
3 changed files with 21 additions and 0 deletions
|
|
@ -103,6 +103,9 @@ bool operator==(const object x, const object y)
|
|||
case type::NEGATIVE_INTEGER:
|
||||
return x.via.i64 == y.via.i64;
|
||||
|
||||
case type::DOUBLE:
|
||||
return x.via.dec == y.via.dec;
|
||||
|
||||
case type::RAW:
|
||||
return x.via.raw.size == y.via.raw.size &&
|
||||
memcmp(x.via.raw.ptr, y.via.raw.ptr, x.via.raw.size) == 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue