115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
last = table->data[i]->hash & (newSize - 1);
for (j = 0; j < last && newData[j] != NULL;
j++);
}
if (j >= last)
OBJC_ERROR("No free bucket!");
newData[j] = table->data[i];
}
}
free(table->data);
table->data = newData;
|
|
|
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
last = table->data[i]->hash & (newSize - 1);
for (j = 0; j < last && newData[j] != NULL;
j++);
}
if (j >= last)
OBJC_ERROR("No free bucket in hash table!");
newData[j] = table->data[i];
}
}
free(table->data);
table->data = newData;
|
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
last = hash & (table->size - 1);
for (i = 0; i < last && table->data[i] != NULL &&
table->data[i] != &objc_deletedBucket; i++);
}
if (i >= last)
OBJC_ERROR("No free bucket!");
if ((bucket = malloc(sizeof(*bucket))) == NULL)
OBJC_ERROR("Not enough memory to allocate hash table bucket!");
bucket->key = key;
bucket->hash = hash;
bucket->object = object;
|
|
|
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
last = hash & (table->size - 1);
for (i = 0; i < last && table->data[i] != NULL &&
table->data[i] != &objc_deletedBucket; i++);
}
if (i >= last)
OBJC_ERROR("No free bucket in hash table!");
if ((bucket = malloc(sizeof(*bucket))) == NULL)
OBJC_ERROR("Not enough memory to allocate hash table bucket!");
bucket->key = key;
bucket->hash = hash;
bucket->object = object;
|