X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/175620d3c65209ce72e451bd75756f6bb67e33a1..4323e0dac386d777d070c68564f1c0041b06935d:/src/Sbitset.h?ds=inline 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)