Skip to content

Commit

Permalink
Use float as lua number by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Askaholic committed Jul 11, 2021
1 parent d438c85 commit 7a48aaa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
- name: Build lua
run: make \
MYCFLAGS='-O3 -fomit-frame-pointer' \
EXTRA_LIBS='-lm -ldl' \
NUMBER='-DLUA_USER_H="\"../etc/luser_number.h"\" -DUSE_FLOAT'
EXTRA_LIBS='-lm -ldl'

- name: Run tests
run: ./bin/lua test/faf.lua
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ COPY . /code/
RUN make \
MYCFLAGS='-O3 -fomit-frame-pointer' \
EXTRA_LIBS='-lm -ldl' \
NUMBER='-DLUA_USER_H="\"../etc/luser_number.h"\" -DUSE_FLOAT' \
install

# Main entrypoint and the default command that will be run
Expand Down
2 changes: 1 addition & 1 deletion config
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ USERCONF=
# Lua uses double for numbers. To change this, uncomment and edit the following
# line, changing USE_XXX to one of USE_DOUBLE, USE_FLOAT, USE_LONG, USE_INT.
#
#NUMBER= -DLUA_USER_H='"../etc/luser_number.h"' -DUSE_XXX
NUMBER= -DLUA_USER_H='"../etc/luser_number.h"' -DUSE_FLOAT

# When compiling Lua with gcc on a Pentium machine, using a fast rounding
# method for the conversion of doubles to ints can give around 20% speed
Expand Down

0 comments on commit 7a48aaa

Please sign in to comment.