Replaced types of length from unsigned int to size_t.

This commit is contained in:
Takatoshi Kondo 2014-01-26 11:29:19 +00:00
parent 3dc636bf3e
commit ffd0525607
4 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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();