Re: bit32 for Lua 5.1?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: bit32 for Lua 5.1?
- From: David Manura <dm.lua@...>
- Date: 2011年1月19日 21:38:16 -0500
On Wed, Jan 19, 2011 at 9:09 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> 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"