/*
* poolid.h
- *
+ *
*/
#ifndef LIBSOLV_POOLID_H
#include "pooltypes.h"
#include "hash.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*-----------------------------------------------
* Ids with relation
*/
-typedef struct _Reldep {
- Id name; // "package"
- Id evr; // "0:42-3"
- int flags; // operation/relation, see REL_x in pool.h
+typedef struct s_Reldep {
+ Id name; /* "package" */
+ Id evr; /* "0:42-3" */
+ int flags; /* operation/relation, see REL_x in pool.h */
} Reldep;
extern Id pool_str2id(Pool *pool, const char *, int);
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);
-
-/* deprecated names, do not use in new code */
-static inline Id str2id(Pool *pool, const char *str, int create)
-{
- return pool_str2id(pool, str, create);
-}
-static inline Id strn2id(Pool *pool, const char *str, unsigned int len, int create)
-{
- return pool_strn2id(pool, str, len, create);
-}
-static inline Id rel2id(Pool *pool, Id name, Id evr, int flags, int create)
-{
- return pool_rel2id(pool, name, evr, flags, create);
-}
-static inline const char *id2str(const Pool *pool, Id id)
-{
- return pool_id2str(pool, id);
-}
-static inline const char *id2rel(const Pool *pool, Id id)
-{
- return pool_id2rel(pool, id);
-}
-static inline const char *id2evr(const Pool *pool, Id id)
-{
- return pool_id2evr(pool, id);
-}
-static inline const char *dep2str(Pool *pool, Id id)
-{
- return pool_dep2str(pool, id);
+#ifdef __cplusplus
}
+#endif
#endif /* LIBSOLV_POOLID_H */