lua-users home
lua-l archive

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

Reuben Thomas wrote:
> This release of my bitwise operations library fixes a bug reported and
> patched by John Stiles, and some deficiencies in the build system.


Perhaps it's operator error, but I get the following:

lua -lbit
Lua 5.1.2  Copyright (C) 1994-2007, PUC-Rio
> print(('%08X'):format(bit.bnot(0)))
> print(('%08X'):format(bit.bnot(1)))
> print(('%08X'):format(bit.bnot(0x12345678)))

Everything else seems okay, but I always get 0 for bnot() calls.

If I change the bnot declaration to be UInteger, then it works:

MONADIC(bnot,    ~,  UInteger)

I'm running x86 Ubuntu 6.10 Edgy Eft Linux. I installed libbit using
plain configure, make, make install, then copied to
in my Lua share packages area.


Innovative Concepts, Inc. 703-893-2007 x220