summaryrefslogtreecommitdiff
path: root/cpp/object.cpp
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:58 +0000
committerfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:58 +0000
commita7936ba05b15ec7a19e8dc75667fec2df13b7ea7 (patch)
treebe42e088b4a54b819052c2651ed0bdd80a432b91 /cpp/object.cpp
parentb790df530aa28099aa130dafad0a591004b88650 (diff)
downloadmsgpack-python-a7936ba05b15ec7a19e8dc75667fec2df13b7ea7.tar.gz
lang/c/msgpack: C++ binding: implemented msgpack::object >> packer<Stream>
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@69 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
Diffstat (limited to 'cpp/object.cpp')
-rw-r--r--cpp/object.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/cpp/object.cpp b/cpp/object.cpp
index 276732c..45cfb5f 100644
--- a/cpp/object.cpp
+++ b/cpp/object.cpp
@@ -81,7 +81,7 @@ std::ostream& operator<< (std::ostream& s, const object o)
default:
// FIXME
- s << "#<UNKNOWN " << (uint16_t)o.type << ">" << std::endl;
+ s << "#<UNKNOWN " << (uint16_t)o.type << ">";
}
return s;
}
@@ -113,7 +113,7 @@ bool operator==(const object x, const object y)
for(object* px(x.via.container.ptr),
* const pxend(x.via.container.ptr + x.via.container.size),
* py(y.via.container.ptr);
- px != pxend; ++px, ++py) {
+ px < pxend; ++px, ++py) {
if(*px != *py) { return false; }
}
return true;
@@ -124,7 +124,7 @@ bool operator==(const object x, const object y)
for(object* px(x.via.container.ptr),
* const pxend(x.via.container.ptr + x.via.container.size*2),
* py(y.via.container.ptr);
- px != pxend; ++px, ++py) {
+ px < pxend; ++px, ++py) {
if(*px != *py) { return false; }
}
return true;
@@ -135,10 +135,5 @@ bool operator==(const object x, const object y)
}
-// FIXME
-//template <typename Stream>
-//const object& operator>> (const object& v, packer<Stream>& o);
-
-
} // namespace msgpack