rtsisyk/luafun — pull request #6 by Yonaba (2013-11-22 11:13:35+00:00)
Title: Added support for non LuaJit and bitwise ops

Hi,

In its current state, this cannot be used without LuaJiT.
The current patch changes that behaviour. In case LuaJIT was found, everything goes as expected.
In case LuaJiT was not found, it will look for an external bitwise op library (through require), and will try to import some specific functions to `fun.operator`.
In case LuaJIT was not found, and also no external bitwise ops library was found, no bitwise op function will be imported (`fun.operator.band`, `fun.operator.bor`, `fun.operator.ror`, etc...) will just be `nil`.

The motive for this was to make the library available to most of Lua users, using LuaJIT or not. Using LuaJIT, one will take advantage of it, but it still remains available to standard Lua users as well :)

Regards,
Roland.