1700 Commits

Author SHA1 Message Date
Thiago de Arruda
896dead7cc Adapt msgpack_test.cpp EXT cases to msgpackc_test.cpp 2014-09-08 12:11:39 -03:00
Thiago de Arruda
dfa277a9e0 Add EXT support to C library 2014-09-08 12:11:38 -03:00
Jason Newton
501260eb54 correct paths for x86_64/generic installations 2014-09-08 22:27:38 +09:00
Takatoshi Kondo
370a9251f5 Merge pull request #117 from redboltz/removed_unused_member_variable
Removed unused member variable.
2014-09-08 17:27:16 +09:00
Takatoshi Kondo
7737f1cb77 Removed unused member variable. 2014-09-08 17:14:56 +09:00
Takatoshi Kondo
f72022037c Merge pull request #116 from redboltz/limited_travis_target
Limited branches for travis-ci.
2014-09-08 17:08:16 +09:00
Takatoshi Kondo
865528f778 Limited branches for travis-ci. 2014-09-08 17:01:04 +09:00
Takatoshi Kondo
d54048eabe Merge pull request #114 from redboltz/poc/0.6
Added travis-ci support.
2014-09-08 16:36:12 +09:00
Takatoshi Kondo
103a6c56e4 Added travis-ci support. 2014-09-08 16:38:44 +09: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
Takatoshi Kondo
7ebdb63131 Merge pull request #113 from tarruda/fix-memory-leak
Fix memory leak in msgpack_unpacker_next
2014-09-07 12:45:23 +09:00
Thiago de Arruda
a186725213 Fix memory leak in msgpack_unpacker_next 2014-09-06 20:01:52 -03:00
David Chappelle
8615358515 Fixed out of source cmake builds to work correctly.
The out of source cmake build was not working correctly. In particular,
the main CMakeLists.txt was not installing from the correct location.
In the case of msgpack.pc, it was trying to install from the top repo
directory instead of from the cmake build directory. So you can now
build as follows:

    $ cd msgpack-c
    $ mkdir build
    $ cd build
    $ cmake ../
    $ make
    $ make install
2014-09-05 19:22:04 +00:00
Takatoshi Kondo
86ad026f11 Renamed the last digit of version string from RELEASE to REVISION.
Added REVISION macro and getting API.
2014-09-03 13:26:34 +09:00
Jason Newton
93d0f0bd00 inline default_reference_func to avoid multiple definition errors 2014-09-03 10:26:09 +09:00
Jason Newton
a0f5392876 correct paths for x86_64/generic installations 2014-09-03 10:26:09 +09:00
Takatoshi Kondo
5896ff3746 Fixed -Wextra warnings on gcc. 2014-09-02 18:15:58 +09:00
Takatoshi Kondo
d15e49cb73 Updated version getting mechanism.
Versions are gotten from version_master.h
2014-09-02 16:42:05 +09:00
Takatoshi Kondo
2103c12e05 Added char* packing support. char* is packed to STR similar as std::string.
See https://github.com/msgpack/msgpack-c/issues/110
2014-09-01 22:42:08 +09:00
Takatoshi Kondo
f0a12a23a1 Merge branch 'tarruda-poc/0.6' into poc/0.6 2014-09-01 13:20:01 +09:00
Thiago de Arruda
30b946ee85 Support out-of-tree builds with cmake
This changes the location of msgpack.pc to support out-of-tree builds.
2014-08-31 10:42:27 -03:00
Takatoshi Kondo
a388000d47 Fixed autotools AC_INIT with external information implemantation.
See:
http://stackoverflow.com/questions/22871340/using-a-variable-in-ac-init
2014-08-31 20:38:52 +09:00
Takatoshi Kondo
4c888294b5 Merge pull request #107 from redboltz/fix_105_for_poc0.6
Fixed operator>>(object const& o, various types& v) return type and valu...
2014-08-31 17:23:18 +09:00
Takatoshi Kondo
68bf4acb4b Fixed operator>>(object const& o, various types& v) return type and value problem.
https://github.com/msgpack/msgpack-c/issues/105
2014-08-29 00:43:18 +09:00
Takatoshi Kondo
2c2df64427 Fixed C++03 and C++11 conditional tests building problem on cmake. 2014-08-29 00:38:44 +09:00
Takatoshi Kondo
4d6e9d6c05 Removed referenced member from msgpack::unpacked.
Added a referenced parameter to msgpack::unpack() and msgpack::unpacker::next().

msgpack::unpacked is a kind of handler that holds msgpack::object and msgpack::zone, so the size of msgpack::unpacked should be small. There is no reason to have referenced in msgpack::unpacked. msgpack user can get the same information using msgpack::unpack() and msgpack::unpacker::next().
2014-08-11 15:50:51 +09:00
Takatoshi Kondo
f969f6f39c Replaced zone* member variable in object with zone&.
Added msgpack::object::with_zone tests.
Added tuples operator<<'s parameter to const.
Fixed array object::with_zone pointer and size unset problem.
Fixed forward_list object::with_zone pointer and size unset problem.
2014-08-11 13:23:27 +09:00
Takatoshi Kondo
8920c49597 Unified test files extension as cpp. 2014-08-11 09:01:17 +09:00
Takatoshi Kondo
e18102d16f Replaced size() with std::distance. 2014-08-11 07:48:30 +09:00
Takatoshi Kondo
ea23bf843e Added std::forward_list support.
Fixed cmake filename typo.
2014-08-10 23:45:50 +09:00
Takatoshi Kondo
e217e72c22 Fixed msgpack::object type EXT comparison problem.
Added msgpack::object type EXT ostream minimal output.
2014-08-10 23:23:52 +09:00
Takatoshi Kondo
0bc4b3f599 Added the C++11 std::array support.
std::array<char, N> is mapped to BIN. That is the same mannar as std::vector.
2014-08-10 23:06:30 +09:00
Takatoshi Kondo
b2f5893669 Added reference to return value. 2014-08-10 22:04:31 +09:00
Takatoshi Kondo
9a1ccaf155 Merge pull request #100 from redboltz/add_vector_char_as_bin
vector<char> is mapped to BIN
2014-08-10 21:52:02 +09:00
Takatoshi Kondo
0201c21b9a Added minimum copy/reference threshold.
Even if ref_size is given on vrefbuffer's constructor, the minimum size of vrefbuffer::ref_buffer is 10.
Because int64, uint64, and double's msgpack expression size equals 9, and those buffer is allocated on the stack internally.
2014-08-08 14:28:03 +09:00
Takatoshi Kondo
dee68403df Replaced obsolete interface with recommended one on the example code. 2014-08-08 12:13:34 +09:00
Takatoshi Kondo
0a99b9f933 Fixed the problem that reference function doesn't pass correctly.
Fixed referenced flag writing timing on next(). It should place before flush.
Added msgpack_tuple test for CMakeLists.txt
Untabified CMakeLists.txt
Added reference function test.
2014-08-07 23:26:09 +09:00
Takatoshi Kondo
17e696fc0d Removed redundant memory allocation from zone.
Removed zone::create and zone::destroy.
We can use zone as follows:
   zone z; // on stack
   zone* z = new zone; // on heap

Fixed a resource leak when zone::push_finalizer(msgpack::unique_ptr<T>) is called.
2014-08-07 15:23:34 +09:00
Takatoshi Kondo
b5b459cfca Reordered unpack selector sequence. 2014-08-07 10:40:21 +09:00
Takatoshi Kondo
7822bc787d Replaced switch-case and bit calculation with a table. 2014-08-07 10:28:18 +09:00
Takatoshi Kondo
1f5d6b9cac Added EXT support.
Removed obsolete unpack functions.
Updated examples that no longer use obsolete functions.
Added reference checking function to unpacked. ( unpacked::referenced() )
Added std:: namespace.
Added reference or copy choice function and default behavior:
  When you use unpacker, default behavior is:
    STR, BIN, EXT types are always held by reference.
  When you don't use unpacker, default behavior is:
    STR, BIN, EXT types are always held by copy.
    The memory is allocated from zone.
  You can customize the behavior passing your custom judging function to unpack() or unpacker's constructor.
2014-08-06 16:18:37 +09:00
Takatoshi Kondo
ce21ab0ebf Fixed zone allocating functions always throw std::bad_alloc() if allocation is failed. 2014-08-06 12:16:28 +09:00
Takatoshi Kondo
5af6d36341 Added a link to wiki. 2014-08-04 16:39:17 +09:00
Takatoshi Kondo
15a0d61a64 Added the new mapping:
std::vector<char> is mapped to BIN.

So, currently BIN, STR, and ARRAY mappings are as follows:
  std::vector<char> is mapped to BIN
  std::string       is mapped to STR
  std::vector<T>    is mapped to ARRAY // T is not char
2014-08-04 15:14:39 +09:00
Takatoshi Kondo
66014eebc0 Updated test codes using recommended interface.
They used to use obsolete interfaces.
2014-08-04 01:08:05 +09:00
Takatoshi Kondo
fd566afeb4 Added reference version of unpacker::next(). 2014-08-04 00:52:04 +09:00
Takatoshi Kondo
e4d32b176e Use const char* version of msgpack::unpack_error to avoid std::string memory allocation when usr C++11 compiler.
See http://www.cplusplus.com/reference/stdexcept/runtime_error/?kw=runtime_error
2014-08-03 17:04:46 +09:00
Takatoshi Kondo
b27c87c9ed Replaced C-Style cast with static_cast. 2014-08-03 16:38:58 +09:00
Takatoshi Kondo
3729f334a1 Replaced size_t with std::size_t. 2014-08-03 16:34:47 +09:00
Takatoshi Kondo
55bf279a7c Removed obsolete unpack interface from test codes. 2014-08-03 08:08:08 +09:00