[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] bitlib release 22
- From: Doug Rogers <rogers@...>
- Date: Fri, 09 Nov 2007 15:16:37 -0500
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.
> http://luaforge.net/projects/bitlib/
Reuben,
Perhaps it's operator error, but I get the following:
lua -lbit
Lua 5.1.2 Copyright (C) 1994-2007 Lua.org, PUC-Rio
> print(('%08X'):format(bit.bnot(0)))
00000000
> print(('%08X'):format(bit.bnot(1)))
00000000
> print(('%08X'):format(bit.bnot(0x12345678)))
00000000
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 liblua-bit.so to bit.so
in my Lua share packages area.
Doug
--
Innovative Concepts, Inc. www.innocon.com 703-893-2007 x220