[fpc-devel] TBits class bug?

Michael Van Canneyt michael at freepascal.org
Fri Jan 25 14:07:46 CET 2008

On Fri, 25 Jan 2008, Giuliano Colla wrote:

> Marco van de Voort ha scritto:
> > > However FPC implementation makes inconsistent the values returned from
> > > OpenBit with those obtained reading Size.
> > >
> > > Do I miss some point?
> > 
> > I can imagine bits being allocated in words to avoid endianess problems. So
> > it could be a deliberate deviation for portabilities sake.
> That the implementation needs to be different to support different platforms I
> can understand. Delphi implementation uses asm code which make it i386
> specific.
> What I find harder to swallow is that a size of 31 is reported, when the
> allocated size is 1 and the available size is 32.
> Current implementation makes it impossible to detect if an OpenBit has
> actually created a grow of the bitlist or not, which is necessary if the
> bitlist is used to keep track of other objects being allocated.
> If nobody else is taking care of the matter, as I have a test case ready, I
> could try and fix TBits implementation, in oder to keep portability but to
> provide self-consistency, and submit a patch.

Please submit a patch to me. I'll review and apply it.


More information about the fpc-devel mailing list