Skip to content

Fix decode number to integer#90

Open
KaiveYoung wants to merge 1 commit into
mpx:masterfrom
KaiveYoung:master
Open

Fix decode number to integer#90
KaiveYoung wants to merge 1 commit into
mpx:masterfrom
KaiveYoung:master

Conversation

@KaiveYoung

Copy link
Copy Markdown

Fix #33

Comment thread lua_cjson.c
case T_INTEGER:
lua_pushinteger(l, token->value.number);
break;;
case T_DOUBLE:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this still be named "number", as the number type is generic, and may be 32 or 64 bit?
(i.e. it's called lua_pushnumber for that reason)

@JCash

JCash commented Dec 31, 2024

Copy link
Copy Markdown

I think it'd be nice with a unit test as well, to make sure it works :)

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.

lua 5.3 to add integer

2 participants