Re: Making Lua BitOp work with LNUM patch

  • From: Mike Pall <mike-1311@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 8 Nov 2013 13:45:07 +0100

Methos wrote:
> On OpenWRT, Lua is applied with LNUM patch that changes the number
> representation internally. Initially the compilation of Lua BitOp was
> failing with an error:

Well, that's not a supported configuration for Lua BitOp.

I guess one needs to change barg() to use lua_tointeger() plus a
cast to UBits plus the error check. And BRET needs to use
lua_pushinteger(). Untested.

But ... there are dozens of variations of the LNUM patch around
and they all have their quirks and issues. I'm not sure it's
feasible to support it as a target. A float/int32 or double/int64
mix will never work properly, only a double/int32 mix is ok.

--Mike

Other related posts: