X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/175620d3c65209ce72e451bd75756f6bb67e33a1..72cd9a913f6d282c5e24990505c2c820bda2bf1b:/src/Sbitset.h?ds=sidebyside diff --git a/src/Sbitset.h b/src/Sbitset.h index 0d0aabf8..4a32402e 100644 --- a/src/Sbitset.h +++ b/src/Sbitset.h @@ -1,6 +1,6 @@ /* A simple, memory-efficient bitset implementation. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -20,7 +20,7 @@ #ifndef SBITSET_H_ # define SBITSET_H_ -typedef char *Sbitset; +typedef unsigned char *Sbitset; typedef size_t Sbitset__Index; #define SBITSET__INDEX__CONVERSION_SPEC "zu" @@ -73,10 +73,10 @@ do { \ /* NBITS is the size of every bitset. More than NBITS bits might be set. */ #define Sbitset__or(SELF, OTHER1, OTHER2, NBITS) \ do { \ - char *ptr_self = (SELF); \ - char *ptr_other1 = (OTHER1); \ - char *ptr_other2 = (OTHER2); \ - char *end_self = ptr_self + Sbitset__nbytes (NBITS); \ + Sbitset ptr_self = (SELF); \ + Sbitset ptr_other1 = (OTHER1); \ + Sbitset ptr_other2 = (OTHER2); \ + Sbitset end_self = ptr_self + Sbitset__nbytes (NBITS); \ for (; ptr_self < end_self; ++ptr_self, ++ptr_other1, ++ptr_other2) \ *ptr_self = *ptr_other1 | *ptr_other2; \ } while(0)