Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko <sergepetrenko@tarantool.org>
To: vdavydov.dev@gmail.com
Cc: tarantool-patches@freelists.org,
	Serge Petrenko <sergepetrenko@tarantool.org>
Subject: [PATCH 0/3] decimal. Add internal methods to encode/decode decimals to msgpack.
Date: Fri, 21 Jun 2019 12:02:04 +0300	[thread overview]
Message-ID: <cover.1561107237.git.sergepetrenko@tarantool.org> (raw)

https://github.com/tarantool/tarantool/issues/692
https://github.com/tarantool/tarantool/tree/sp/gh-692-mp-decimal-new

This patchset add the methods necessary to encode/decode decimals as msgpack.
The methods have the similar API to the existing mp methods:
mp_encode_.../mp_decode_...

The first patch updates the msgpuck library to introduce EXT types.
The second path fixes a couple of places in decimal_pack() and decimal_len()
nethods, where const qualifiers were forgotten.
The third patch adds the new methods: mp_encode_decimal(), mp_decode_decimal()
and mp_sizeof_decimal(), and updates the decimal unit test to test them.


Serge Petrenko (3):
  lib: update msgpuck library
  decimal: add const qualifiers for decimal_pack() and decimal_len()
  decimal: allow to encode/decode decimals as MsgPack

 src/lib/core/CMakeLists.txt  |   1 +
 src/lib/core/decimal.c       |   4 +-
 src/lib/core/decimal.h       |   4 +-
 src/lib/core/mp_decimal.c    |  72 ++++++
 src/lib/core/mp_decimal.h    |  62 +++++
 src/lib/core/mp_user_types.h |  38 +++
 src/lib/msgpuck              |   2 +-
 test/unit/decimal.c          |  33 ++-
 test/unit/decimal.result     | 476 ++++++++++++++++++++++++----------
 test/unit/msgpack.result     | 480 ++++++++++++++++++++++++++++++++++-
 10 files changed, 1014 insertions(+), 158 deletions(-)
 create mode 100644 src/lib/core/mp_decimal.c
 create mode 100644 src/lib/core/mp_decimal.h
 create mode 100644 src/lib/core/mp_user_types.h

-- 
2.20.1 (Apple Git-117)

             reply	other threads:[~2019-06-21  9:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21  9:02 Serge Petrenko [this message]
2019-06-21  9:02 ` [PATCH 1/3] lib: update msgpuck library Serge Petrenko
2019-06-21 16:00   ` Vladimir Davydov
2019-06-21  9:02 ` [PATCH 2/3] decimal: add const qualifiers for decimal_pack() and decimal_len() Serge Petrenko
2019-06-21 16:00   ` Vladimir Davydov
2019-06-21  9:02 ` [PATCH 3/3] decimal: allow to encode/decode decimals as MsgPack Serge Petrenko
2019-06-24  8:35   ` Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1561107237.git.sergepetrenko@tarantool.org \
    --to=sergepetrenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [PATCH 0/3] decimal. Add internal methods to encode/decode decimals to msgpack.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox