* src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
of char*.
(Sbitset__isEmpty): Use Sbitset instead of char*.
* src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
instead of char.  This helps to avoid casting errors.
(Sbitset__or): Use Sbitset instead of char*.
This commit is contained in:
Joel E. Denny
2009-10-16 19:27:12 -04:00
parent 175620d3c6
commit 5297ebb3bc
3 changed files with 19 additions and 9 deletions

View File

@@ -33,9 +33,9 @@ Sbitset__new (Sbitset__Index nbits)
Sbitset
Sbitset__new_on_obstack (Sbitset__Index nbits, struct obstack *obstackp)
{
char *result;
char *ptr;
char *end;
Sbitset result;
Sbitset ptr;
Sbitset end;
aver (nbits);
result = obstack_alloc (obstackp, Sbitset__nbytes (nbits));
for (ptr = result, end = result + Sbitset__nbytes (nbits); ptr < end; ++ptr)
@@ -52,7 +52,7 @@ Sbitset__delete (Sbitset self)
bool
Sbitset__isEmpty (Sbitset self, Sbitset__Index nbits)
{
char *last = self + Sbitset__nbytes (nbits) - 1;
Sbitset last = self + Sbitset__nbytes (nbits) - 1;
for (; self < last; ++self)
if (*self != 0)
return false;