summaryrefslogtreecommitdiff
path: root/cpp/object.hpp
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:56 +0000
committerfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:56 +0000
commit990ac38ccdb51acc520fa43c99115cb216ec95e6 (patch)
tree47e1cac5605c2839fd7ae5af4ae30ed34060e2f3 /cpp/object.hpp
parent249d3e9c908ea4a3fd2012a753ca7f0cea0b4ee5 (diff)
downloadmsgpack-python-990ac38ccdb51acc520fa43c99115cb216ec95e6.tar.gz
lang/c/msgpack: C++ binding: implemented built-in buffer.
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@55 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
Diffstat (limited to 'cpp/object.hpp')
-rw-r--r--cpp/object.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/object.hpp b/cpp/object.hpp
index 3f22dfc..f029e32 100644
--- a/cpp/object.hpp
+++ b/cpp/object.hpp
@@ -31,8 +31,9 @@ public:
};
struct const_raw {
- const_raw() : ptr(NULL), len(0) {}
- const_raw(const void* p, size_t l) : ptr(p), len(l) {}
+ explicit const_raw() : ptr(NULL), len(0) {}
+ explicit const_raw(const void* p, size_t l) : ptr(p), len(l) {}
+ const_raw(const raw& m) : ptr(m.ptr), len(m.len) {}
public:
const void* ptr;
size_t len;
@@ -257,8 +258,8 @@ private: \
uint32_t len; \
};
-RAW_CLASS(raw, void*, raw xraw(); const_raw xraw() const; )
-RAW_CLASS(const_raw, const void*, const_raw xraw() const; )
+RAW_CLASS(raw_ref, void*, raw xraw(); const_raw xraw() const; )
+RAW_CLASS(const_raw_ref, const void*, const_raw xraw() const; )
#undef RAW_CLASS(NAME, TYPE, EXTRA)