20 Commits

Author SHA1 Message Date
Takatoshi Kondo
92822996e2 Fixed #348.
The parameter 'offset' of unpack() function family, not unpacker family, updates only when the function successfully finished.

The parameter 'offset' used to update even if a caller passes insufficient bytes to the unpack() function family.
2015-08-19 10:52:08 +09:00
tbeu
8921f9dcfc Do not interleave code and declarations in C files
Avoid C99 style to interleave code and declarations in order to compile msgpackc with Visual Studion < 2013
2015-03-26 21:48:03 +01:00
Takatoshi Kondo
82a10cba5c Fixed typo.
Replaced 'decl' with 'decr'.
2015-03-09 14:49:18 +09:00
Takatoshi Kondo
737e6703df Fixed #191.
The names of float format family are changed.

old                      new
dec                   -> f64
MSGPACK_OBJECT_DOUBLE -> MSGPACK_OBJECT_FLOAT
msgpack::type::DOUBLE -> msgpack::type::FLOAT

Client codes could have compile errors when it use dec, MSGPACK_OBJECT_DOUBLE or msgpack::type::DOUBLE.
The best way to fix such errors, update client code. If it can't, set MSGPACK_USE_LEGACY_NAME_AS_FLOAT macro.
Then both old names and new names are available.
2015-01-16 00:20:43 +09:00
Takatoshi Kondo
d6cc5494a9 Fixed memory size caluclation problem.
See https://github.com/msgpack/msgpack-c/issues/149
2014-11-01 19:41:47 +09:00
Thiago de Arruda
dfa277a9e0 Add EXT support to C library 2014-09-08 12:11:38 -03:00
Takatoshi Kondo
11f1d5fbbd Fixed https://github.com/msgpack/msgpack-c/pull/113
When the original PR was applied, the resource leak had been fixed, but a dual free problem had been happened.

When msgpack_unpacker_next returns MSGPACK_UNPACK_CONTINUE, msgpack_unpacked::zone is not replaced. Then mespack_zone_free is called twice with the same object. msgpack_unpacked_destroy frees msgpack::zone when it is not NULL and set it to NULL.

Also, fixed memory leak (msgpack_sbuffer) on the test code.
2014-09-07 13:56:07 +09:00
Thiago de Arruda
a186725213 Fix memory leak in msgpack_unpacker_next 2014-09-06 20:01:52 -03:00
Takatoshi Kondo
5896ff3746 Fixed -Wextra warnings on gcc. 2014-09-02 18:15:58 +09:00
Takatoshi Kondo
0380215982 Fixed https://github.com/msgpack/msgpack-c/issues/88
Added examples for the following updated functions:

msgpack_unpack_return msgpack_unpacker_next(msgpack_unpacker* mpac, msgpack_unpacked* result);

msgpack_unpack_return
msgpack_unpack_next(msgpack_unpacked* result,
        const char* data, size_t len, size_t* off);
2014-07-13 09:35:58 +09:00
Takatoshi Kondo
b0df21295c Untabified.
Adjust line break positions.
2014-07-12 00:17:31 +09:00
Takatoshi Kondo
d70c44b723 Added bin and str families support. 2014-07-07 16:17:59 +09:00
Takatoshi Kondo
751a6f98fe Moved bool and inline definition from msgpack.h to sysdep.h.
Set compile settiong on MSVC. ".c" files are compliled as C, not C++. (msgpack_vc8.vcproj, CMakeLists.txt)
Fixed msgpack root object initialization problem on MSVC. {} initialization is not supported on MSVC.
2014-07-02 17:43:07 +09:00
Felipe Oliveira Carvalho
8e0137e1d2 Fix to allow projects to compile with -Wconversion
Projects that use -Wconversion don't compile due to errors in msgpack header
files. This commit fixes all the errors in msgpack-c for when -Wconversion is
enabled.

Now I can even compile msgpack-c itself with -Wconversion and all my projects:

    CFLAGS=-Wconversion ./configure
		make
2014-05-19 15:30:14 -03:00
Takatoshi Kondo
c04ef9efe5 Merge pull request #38 from redboltz/copy_msgpack_object_by_memcpy
Fixed issue #37.
2013-12-15 20:25:15 -08:00
Takatoshi Kondo
b774c07d19 When the compiler is gcc, use memcpy, otherwise use an assignment operator.
The memcpy approach is a workaround for gcc's bug. The speed performance on gcc is the same between both approach. But on clang, the memcpy approach is 10% slower than an assignment approach. Hence I added the switching approach code using compiler checked macro.

Note: __GNUC__ is defined both gcc and clang. So I use __GNUC__ && !__clang__
2013-12-16 13:25:09 +09:00
Takatoshi Kondo
be67d3e362 Fixed an unused function warning.
This fix is a part of issue #33.
35ba41c245
2013-11-27 10:33:52 +09:00
Takatoshi Kondo
3e2ae7cc78 Fixed issue #37.
It seems to be gcc's bug.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416
2013-11-11 09:51:04 +00:00
Nobuyuki Kubota
1f30cc203a Temporary fix for a compilation error on OS X
fixes #3
fixes #15
2013-04-09 17:38:49 -07:00
FURUHASHI Sadayuki
b463d9b687 reorganized tree 2013-01-03 19:13:28 -08:00