Skip to content

fix: preserve 64-bit integers in Tarantool builds#2

Merged
alrsorokin merged 2 commits into
masterfrom
fix_long_precision
Jun 5, 2026
Merged

fix: preserve 64-bit integers in Tarantool builds#2
alrsorokin merged 2 commits into
masterfrom
fix_long_precision

Conversation

@alrsorokin
Copy link
Copy Markdown

lua_pushinteger loses precision for values beyond double mantissa, so large JSON integers were rounded (e.g. 123456789012345678, 123456789012345680). Use luaL_pushint64/luaL_pushuint64 in TT_COMPAT builds to match tarantool json behavior: small ints as numbers, large ints as cdata (long/unsigned long).

lua_pushinteger loses precision for values beyond double mantissa,
so large JSON integers were rounded (e.g. 123456789012345678,
123456789012345680). Use luaL_pushint64/luaL_pushuint64 in TT_COMPAT
builds to match tarantool json behavior: small ints as numbers, large
ints as cdata (long/unsigned long).
@alrsorokin alrsorokin requested a review from Kasen June 5, 2026 12:54
@alrsorokin alrsorokin self-assigned this Jun 5, 2026
@alrsorokin alrsorokin force-pushed the fix_long_precision branch 4 times, most recently from 1c96115 to 705d47b Compare June 5, 2026 13:18
@alrsorokin alrsorokin force-pushed the fix_long_precision branch from 705d47b to 08a415f Compare June 5, 2026 13:20
@alrsorokin alrsorokin merged commit cc2a882 into master Jun 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants