mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
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
This commit is contained in:
parent
249d3e9c90
commit
990ac38ccd
9 changed files with 299 additions and 66 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue