[PATCH 0/2] decimal: expose decimal module to lua.
Serge Petrenko
sergepetrenko at tarantool.org
Wed Jun 19 18:58:03 MSK 2019
https://github.com/tarantool/tarantool/issues/692
https://github.com/tarantool/tarantool/tree/sp/gh-692-decimal-lua
This patchset adds decimal module to lua.
Since FFI CDATA is chosen to store decimals on lua stack, a new helper to
register FFI metatypes is added in the first patch.
The second patch does the job itself of exposing the decimal module to lua and
adds a minor tes. The patch also contains a documentation request in the commit
message.
Serge Petrenko (2):
lua/utils: add a function to register FFI metatypes.
decimal: expose decimal type to lua.
src/CMakeLists.txt | 1 +
src/lua/decimal.c | 327 ++++++++++++++++++++++++++++++++++++++
src/lua/decimal.h | 39 +++++
src/lua/init.c | 2 +
src/lua/utils.c | 28 ++++
src/lua/utils.h | 13 ++
test/app/decimal.result | 172 ++++++++++++++++++++
test/app/decimal.test.lua | 50 ++++++
8 files changed, 632 insertions(+)
create mode 100644 src/lua/decimal.c
create mode 100644 src/lua/decimal.h
create mode 100644 test/app/decimal.result
create mode 100644 test/app/decimal.test.lua
--
2.20.1 (Apple Git-117)
More information about the Tarantool-patches
mailing list