Skip to content

Commit b01fd2d

Browse files
afurmnobu
authored andcommitted
Fix RSET_IS_MEMBER macro parameter mismatch
The RSET_IS_MEMBER macro had a parameter named 'sobj' but the macro body used 'set' instead, causing the first argument to be ignored. This worked by accident because all current callers use a variable named 'set', but would cause compilation failure if called with a differently named variable: error: use of undeclared identifier 'set' Changed the parameter name from 'sobj' to 'set' to match the macro body and be consistent with other RSET_* macros.
1 parent bad7dd5 commit b01fd2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

set.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static ID id_class_methods;
116116
#define RSET_SIZE(set) set_table_size(RSET_TABLE(set))
117117
#define RSET_EMPTY(set) (RSET_SIZE(set) == 0)
118118
#define RSET_SIZE_NUM(set) SIZET2NUM(RSET_SIZE(set))
119-
#define RSET_IS_MEMBER(sobj, item) set_table_lookup(RSET_TABLE(set), (st_data_t)(item))
119+
#define RSET_IS_MEMBER(set, item) set_table_lookup(RSET_TABLE(set), (st_data_t)(item))
120120
#define RSET_COMPARE_BY_IDENTITY(set) (RSET_TABLE(set)->type == &identhash)
121121

122122
struct set_object {

0 commit comments

Comments
 (0)