Skip to content

Commit

Permalink
Merge branch 'tree-try-parse' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ludocode committed May 2, 2018
2 parents 65b2b85 + 57d7a71 commit 46f1dc1
Show file tree
Hide file tree
Showing 6 changed files with 506 additions and 348 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Expand Up @@ -22,7 +22,9 @@ New Features:

- The Node API can now parse messages indefinitely from a continuous stream. A tree can be initialized with `mpack_tree_init_stream()` to receive a callback for more data.

- The writer now supports a v4 compatibility mode. Call `mpack_writer_set_version(writer, mpack_version_v4);` to encode without using the `raw8`, `bin` and `ext` types.
- The Node API can now parse messages incrementally from a non-blocking stream. Call `mpack_tree_try_parse()` to continue parsing. It will return true when a complete message has become available.

- The writer now supports a v4 compatibility mode. Call `mpack_writer_set_version(writer, mpack_version_v4);` to encode without using the `raw8`, `bin`, `ext` and `timestamp` types.

- The stdio helpers now allow reading from a `FILE*`. `_init_file()` functions have been renamed to `_init_filename()`. The old names will continue to work for a few more versions.

Expand Down
1 change: 0 additions & 1 deletion src/mpack-config.h.sample
Expand Up @@ -329,7 +329,6 @@

/**
* The maximum depth for the node parser if @ref MPACK_MALLOC is not available.
* The parsing stack is placed on the call stack.
*/
#ifndef MPACK_NODE_MAX_DEPTH_WITHOUT_MALLOC
#define MPACK_NODE_MAX_DEPTH_WITHOUT_MALLOC 32
Expand Down
2 changes: 2 additions & 0 deletions src/mpack/mpack-common.h
Expand Up @@ -788,6 +788,7 @@ MPACK_INLINE void mpack_store_i64(char* p, int64_t val) {mpack_store_u64(p, (uin

MPACK_INLINE float mpack_load_float(const char* p) {
MPACK_CHECK_FLOAT_ORDER();
MPACK_STATIC_ASSERT(sizeof(float) == sizeof(uint32_t), "float is wrong size??");
union {
float f;
uint32_t u;
Expand All @@ -798,6 +799,7 @@ MPACK_INLINE float mpack_load_float(const char* p) {

MPACK_INLINE double mpack_load_double(const char* p) {
MPACK_CHECK_FLOAT_ORDER();
MPACK_STATIC_ASSERT(sizeof(double) == sizeof(uint64_t), "double is wrong size??");
union {
double d;
uint64_t u;
Expand Down

0 comments on commit 46f1dc1

Please sign in to comment.