diff options
author | frsyuki <frsyuki@users.sourceforge.jp> | 2009-12-16 04:08:36 +0900 |
---|---|---|
committer | frsyuki <frsyuki@users.sourceforge.jp> | 2009-12-16 04:08:36 +0900 |
commit | 686e8ca0f004004f4b8e10438fe91a48a95e6ff9 (patch) | |
tree | 472d224034a5b0e0abbe472296f5fe97a5104b13 | |
parent | 5aa47d667783476277409b06d5829322a801df05 (diff) | |
download | msgpack-python-686e8ca0f004004f4b8e10438fe91a48a95e6ff9.tar.gz |
c,cpp: fix unpacker
-rw-r--r-- | c/unpack.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -152,7 +152,7 @@ static inline void init_count(void* buffer) static inline void decl_count(void* buffer) { // atomic if(--*(_msgpack_atomic_counter_t*)buffer == 0) { free(buffer); } - if(_msgpack_sync_decr_and_fetch((volatile _msgpack_atomic_counter_t*)buffer)) { + if(_msgpack_sync_decr_and_fetch((volatile _msgpack_atomic_counter_t*)buffer) == 0) { free(buffer); } } |