#include "poolvendor.h"
#include "repo.h"
#include "poolid.h"
-#include "poolid_private.h"
#include "poolarch.h"
#include "util.h"
#include "bitmap.h"
pool = (Pool *)solv_calloc(1, sizeof(*pool));
stringpool_init(&pool->ss, initpool_data);
-
- /* alloc space for RelDep 0 */
- pool->rels = solv_extend_resize(0, 1, sizeof(Reldep), REL_BLOCK);
- pool->nrels = 1;
- memset(pool->rels, 0, sizeof(Reldep));
+ pool_init_rels(pool);
/* alloc space for Solvable 0 and system solvable */
pool->solvables = solv_extend_resize(0, 2, sizeof(Solvable), SOLVABLE_BLOCK);
#include "poolid_private.h"
#include "util.h"
+#define REL_BLOCK 1023 /* hashtable for relations */
+
static inline void
grow_whatprovides(Pool *pool, Id id)
{
return id;
}
+void
+pool_init_rels(Pool *pool)
+{
+ /* alloc space for RelDep 0 */
+ pool->rels = solv_extend_resize(0, 1, sizeof(Reldep), REL_BLOCK);
+ pool->nrels = 1;
+ memset(pool->rels, 0, sizeof(Reldep));
+}
+
void
pool_resize_rels_hash(Pool *pool, int numnew)
{
extern void pool_shrink_strings(Pool *pool);
extern void pool_shrink_rels(Pool *pool);
extern void pool_freeidhashes(Pool *pool);
-extern void pool_resize_rels_hash(Pool *pool, int numnew);
+
+extern void pool_resize_rels_hash(Pool *pool, int numnew); /* internal */
+extern void pool_init_rels(Pool *pool); /* internal */
#ifdef __cplusplus
}
#ifndef LIBSOLV_POOLID_PRIVATE_H
#define LIBSOLV_POOLID_PRIVATE_H
-/* the size of all buffers is incremented in blocks
- * these are the block values (increment values) for the
- * rel hashtable
- */
-#define REL_BLOCK 1023 /* hashtable for relations */
+/* the size of all buffers is incremented in blocks */
#define WHATPROVIDES_BLOCK 1023
#endif /* LIBSOLV_POOLID_PRIVATE_H */