diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-05-23 19:53:19 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-06-02 16:05:24 +0200 |
commit | d5f047bee04a42f40425c34061c84b39af846e1f (patch) | |
tree | d81bb803389467604e2ad319b54b211415594ce6 /src/mpack/mpack_core.h | |
parent | d93ba03c717bee05fe6d239fd7faefe6e9698c85 (diff) | |
download | rneovim-d5f047bee04a42f40425c34061c84b39af846e1f.tar.gz rneovim-d5f047bee04a42f40425c34061c84b39af846e1f.tar.bz2 rneovim-d5f047bee04a42f40425c34061c84b39af846e1f.zip |
refactor(api): use a unpacker based on libmpack instead of msgpack-c
Currently this is more or less a straight off reimplementation,
but this allow further optimizations down the line, especially
for avoiding memory allocations of rpc objects.
Current score for "make functionaltest; make oldtest" on a -DEXITFREE build:
is 117 055 352 xfree(ptr != NULL) calls (that's NUMBERWANG!).
Diffstat (limited to 'src/mpack/mpack_core.h')
-rw-r--r-- | src/mpack/mpack_core.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mpack/mpack_core.h b/src/mpack/mpack_core.h index 9edd13c41e..1d601bc82d 100644 --- a/src/mpack/mpack_core.h +++ b/src/mpack/mpack_core.h @@ -83,5 +83,7 @@ MPACK_API int mpack_read(mpack_tokbuf_t *tb, const char **b, size_t *bl, mpack_token_t *tok) FUNUSED FNONULL; MPACK_API int mpack_write(mpack_tokbuf_t *tb, char **b, size_t *bl, const mpack_token_t *tok) FUNUSED FNONULL; +int mpack_rtoken(const char **buf, size_t *buflen, + mpack_token_t *tok); #endif /* MPACK_CORE_H */ |