lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Wed, Jan 19, 2011 at 9:09 PM, Luiz Henrique de Figueiredo
<> wrote:
> Perhaps it would be easier to pack all backport code into a lbitlib.h and
> just add one line to lbitlib.c, ideally at the very top:
> #include "lbitlib.h"

I'd prefer that.  Taking it one step further, you could leave
lbitlib.c unchanged but create a "lbitlib51.c" file that does

  #define LUAMOD_API
  #define LUA_BITLIBNAME  "bit32"
  #define luaL_newlib(x,y) luaL_register(x,LUA_BITLIBNAME,y)
  // ... etc...
  #include "lbitlib.c"