Mercurial > hg > CbC > CbC_gcc
diff libobjc/class.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/libobjc/class.c Fri Oct 27 22:46:09 2017 +0900 +++ b/libobjc/class.c Thu Oct 25 07:37:49 2018 +0900 @@ -1,5 +1,5 @@ /* GNU Objective C Runtime class related functions - Copyright (C) 1993-2017 Free Software Foundation, Inc. + Copyright (C) 1993-2018 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup and Dennis Glatting. Lock-free class table code designed and written from scratch by @@ -153,14 +153,16 @@ string, and HASH the computed hash of the string; CLASS_NAME is untouched. */ -#define CLASS_TABLE_HASH(INDEX, HASH, CLASS_NAME) \ - HASH = 0; \ - for (INDEX = 0; CLASS_NAME[INDEX] != '\0'; INDEX++) \ - { \ - HASH = (HASH << 4) ^ (HASH >> 28) ^ CLASS_NAME[INDEX]; \ - } \ - \ - HASH = (HASH ^ (HASH >> 10) ^ (HASH >> 20)) & CLASS_TABLE_MASK; +#define CLASS_TABLE_HASH(INDEX, HASH, CLASS_NAME) \ + do { \ + HASH = 0; \ + for (INDEX = 0; CLASS_NAME[INDEX] != '\0'; INDEX++) \ + { \ + HASH = (HASH << 4) ^ (HASH >> 28) ^ CLASS_NAME[INDEX]; \ + } \ + \ + HASH = (HASH ^ (HASH >> 10) ^ (HASH >> 20)) & CLASS_TABLE_MASK; \ + } while (0) /* Setup the table. */ static void