ret = 1;
break;
}
+ prev = current;
current = current->next;
}
void
_sostate_hash_check(GL_Object_Hash_Base *hash_base)
{
- if (hash_base->item_size < hash_base->hash_size)
+ if (hash_base->item_size + 1 < hash_base->hash_size)
return;
int oldsize = hash_base->hash_size;
hash_base_real = _get_shared_object_hash_real(sostate, type);
newid = hash_base->last_id + 1;
- if (newid >= GL_OBJECT_ID_LIMIT)
+ if (newid >= hash_base->hash_size)
{
hash_base->is_looped = 1;
newid = 1;
int i;
int findingid = newid;
newid = -1;
- for (i = 0; i < GL_OBJECT_ID_LIMIT; i++)
+ for (i = 0; i < hash_base->hash_size; i++)
{
GL_Object_Hash *exist_hash = NULL;
FIND_HASH(hash_base, findingid, exist_hash);
break;
}
findingid++;
- if (findingid >= GL_OBJECT_ID_LIMIT) findingid = 1;
+ if (findingid >= hash_base->hash_size) findingid = 1;
}
AST(newid != -1);
}
}
#define FIND_OBJ_FROM_HASH_WITH_VERIFY(hash_base, hash, object) \
- if ((hash) < 0 || (hash) > GL_OBJECT_ID_LIMIT) { ret = 0; goto finish; } \
+ if ((hash) < 0) { ret = 0; goto finish; } \
{ \
GL_Object_Hash *object_hash = NULL; \
FIND_HASH((hash_base), (hash), object_hash); \