From ffd0525607c935abda47af14eab8ddb969d1cb0d Mon Sep 17 00:00:00 2001 From: Takatoshi Kondo Date: Sun, 26 Jan 2014 11:29:19 +0000 Subject: [PATCH] Replaced types of length from unsigned int to size_t. --- src/msgpack/sbuffer.h | 2 +- src/msgpack/sbuffer.hpp | 2 +- src/msgpack/zbuffer.h | 4 ++-- src/msgpack/zbuffer.hpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) 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();