diff --git a/src/msgpack/sbuffer.h b/src/msgpack/sbuffer.h index 778dea71..4ade093b 100644 --- a/src/msgpack/sbuffer.h +++ b/src/msgpack/sbuffer.h @@ -64,7 +64,7 @@ static inline void msgpack_sbuffer_free(msgpack_sbuffer* sbuf) #define MSGPACK_SBUFFER_INIT_SIZE 8192 #endif -static inline int msgpack_sbuffer_write(void* data, const char* buf, unsigned int len) +static inline int msgpack_sbuffer_write(void* data, const char* buf, size_t len) { msgpack_sbuffer* sbuf = (msgpack_sbuffer*)data; diff --git a/src/msgpack/sbuffer.hpp b/src/msgpack/sbuffer.hpp index 14c5d2a2..fce56ad5 100644 --- a/src/msgpack/sbuffer.hpp +++ b/src/msgpack/sbuffer.hpp @@ -47,7 +47,7 @@ public: } public: - void write(const char* buf, unsigned int len) + void write(const char* buf, size_t len) { if(base::alloc - base::size < len) { expand_buffer(len); diff --git a/src/msgpack/zbuffer.h b/src/msgpack/zbuffer.h index efdd3049..c5630514 100644 --- a/src/msgpack/zbuffer.h +++ b/src/msgpack/zbuffer.h @@ -65,7 +65,7 @@ static inline char* msgpack_zbuffer_release_buffer(msgpack_zbuffer* zbuf); #define MSGPACK_ZBUFFER_RESERVE_SIZE 512 #endif -static inline int msgpack_zbuffer_write(void* data, const char* buf, unsigned int len); +static inline int msgpack_zbuffer_write(void* data, const char* buf, size_t len); static inline bool msgpack_zbuffer_expand(msgpack_zbuffer* zbuf); @@ -123,7 +123,7 @@ bool msgpack_zbuffer_expand(msgpack_zbuffer* zbuf) return true; } -int msgpack_zbuffer_write(void* data, const char* buf, unsigned int len) +int msgpack_zbuffer_write(void* data, const char* buf, size_t len) { msgpack_zbuffer* zbuf = (msgpack_zbuffer*)data; diff --git a/src/msgpack/zbuffer.hpp b/src/msgpack/zbuffer.hpp index 4ccb487b..69e2eb79 100644 --- a/src/msgpack/zbuffer.hpp +++ b/src/msgpack/zbuffer.hpp @@ -40,7 +40,7 @@ public: } public: - void write(const char* buf, unsigned int len) + void write(const char* buf, size_t len) { if(msgpack_zbuffer_write(this, buf, len) < 0) { throw std::bad_alloc();