Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: lua/lua
base: master
Choose a base ref
head repository: bsdimp/lua
compare: freebsd-lua-changes
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Jan 26, 2023

  1. config: Allow avoiding floating point all together

    Sometimes it is desirable to avoid float and double altogether. If you
    define LUA_AVOID_FLOAT the following will happen:
    	1) quotefloat, and calls to it, are omitted since they aren't
    	   needed
    	2) the 'f' format in str_format is omitted since it isn't needed.
    	3) double is removed from the cD alignment structure
    	4) float and double are omitted from Ftypes
    	5) 'f' and 'd' packing strategies are eliminated from getoption
    	6) float and double cases are eliminated from strpack and
    	   strunpack.
    	7) l_intfitsf is defined to 1 since they always fit.
    	8) In luaK_numberK, assume it's OK if there's a hash collision
    	   since floats are ints and the extra effort to move the value
    	   uses float/double to make the computation.
    
    this avoids all uses of float and double in lua, and allows
    LUA_FLOAT_TYPE to be created as, for example, an int64_t.
    
    Sponsored by:		Netflix
    bsdimp committed Jan 26, 2023