ObjFW  Check-in [81891380b6]

Overview
Comment:runtime: Make Apple GCC with -Wshadow happy
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.90
Files: files | file ages | folders
SHA3-256: 81891380b6802a0b6de3c20fcc56bea62e60eb946bc92e5f4c16c61cbf645096
User & Date: js on 2017-10-23 20:43:17
Other Links: branch diff | manifest | tags
Context
2017-10-23
21:01
ChangeLog: Add 0.90.2 check-in: e4befc3087 user: js tags: 0.90.2-release, 0.90
20:43
runtime: Make Apple GCC with -Wshadow happy check-in: 81891380b6 user: js tags: 0.90
2017-10-22
22:13
Set version to 0.90.2 check-in: 3ca682c7ff user: js tags: 0.90
Changes

Modified src/runtime/hashtable.m from [69b267cc69] to [2844ae174b].

127
128
129
130
131
132
133
134

135
136
137
138
139
140
141
142
143
144
145

146
147
148
149
150
151
152
153
154
155
156
157
158

159
160
161
162
163
164
165
127
128
129
130
131
132
133

134
135
136
137
138
139
140
141
142
143
144

145
146
147
148
149
150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
165







-
+










-
+












-
+








	free(table->data);
	table->data = ndata;
	table->size = nsize;
}

static inline bool
index_for_key(struct objc_hashtable *table, const void *key, uint32_t *index)
index_for_key(struct objc_hashtable *table, const void *key, uint32_t *idx)
{
	uint32_t i, hash;

	hash = table->hash(key) & (table->size - 1);

	for (i = hash; i < table->size && table->data[i] != NULL; i++) {
		if (table->data[i] == &objc_deleted_bucket)
			continue;

		if (table->equal(table->data[i]->key, key)) {
			*index = i;
			*idx = i;
			return true;
		}
	}

	if (i < table->size)
		return false;

	for (i = 0; i < hash && table->data[i] != NULL; i++) {
		if (table->data[i] == &objc_deleted_bucket)
			continue;

		if (table->equal(table->data[i]->key, key)) {
			*index = i;
			*idx = i;
			return true;
		}
	}

	return false;
}