diff options
author | INADA Naoki <songofacandy@gmail.com> | 2015-11-07 16:30:18 +0900 |
---|---|---|
committer | INADA Naoki <songofacandy@gmail.com> | 2015-11-07 16:52:58 +0900 |
commit | e9ab4d8824fddd070bac7cedca332130bf2028b0 (patch) | |
tree | 20f7d97c1f94fa2e5fe3df00a88c574f5748d155 /msgpack/unpack_template.h | |
parent | ab359e333044fc89559b946cfec8efb83c2c6122 (diff) | |
download | msgpack-python-e9ab4d8824fddd070bac7cedca332130bf2028b0.tar.gz |
Fix warnings
fixes #146
Diffstat (limited to 'msgpack/unpack_template.h')
-rw-r--r-- | msgpack/unpack_template.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/msgpack/unpack_template.h b/msgpack/unpack_template.h index d34eced..5b389b8 100644 --- a/msgpack/unpack_template.h +++ b/msgpack/unpack_template.h @@ -24,8 +24,8 @@ typedef struct unpack_stack { PyObject* obj; - size_t size; - size_t count; + Py_ssize_t size; + Py_ssize_t count; unsigned int ct; PyObject* map_key; } unpack_stack; @@ -72,7 +72,7 @@ static inline PyObject* unpack_data(unpack_context* ctx) template <bool construct> -static inline int unpack_execute(unpack_context* ctx, const char* data, size_t len, size_t* off) +static inline int unpack_execute(unpack_context* ctx, const char* data, Py_ssize_t len, Py_ssize_t* off) { assert(len >= *off); @@ -89,7 +89,7 @@ static inline int unpack_execute(unpack_context* ctx, const char* data, size_t l */ unpack_user* user = &ctx->user; - PyObject* obj; + PyObject* obj = NULL; unpack_stack* c = NULL; int ret; @@ -409,7 +409,7 @@ _end: #undef start_container template <unsigned int fixed_offset, unsigned int var_offset> -static inline int unpack_container_header(unpack_context* ctx, const char* data, size_t len, size_t* off) +static inline int unpack_container_header(unpack_context* ctx, const char* data, Py_ssize_t len, Py_ssize_t* off) { assert(len >= *off); uint32_t size; |