summaryrefslogtreecommitdiff
path: root/src/poolid.h
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2011-05-02 13:08:09 +0200
committerMichael Schroeder <mls@suse.de>2011-05-02 13:08:09 +0200
commit31d9370991ef97ab188dc90bfb9aef9f207f735e (patch)
tree3cfe4af099eafeec70f8d0dca32240eec2e31bd9 /src/poolid.h
parentac09948ee86391a410bdab18b87609765409cb01 (diff)
downloadlibsolv-31d9370991ef97ab188dc90bfb9aef9f207f735e.tar.gz
libsolv-31d9370991ef97ab188dc90bfb9aef9f207f735e.tar.bz2
libsolv-31d9370991ef97ab188dc90bfb9aef9f207f735e.zip
- clean up function names for shared library
Diffstat (limited to 'src/poolid.h')
-rw-r--r--src/poolid.h50
1 files changed, 41 insertions, 9 deletions
diff --git a/src/poolid.h b/src/poolid.h
index 698f7a7..dc4913e 100644
--- a/src/poolid.h
+++ b/src/poolid.h
@@ -16,8 +16,9 @@
#include "pooltypes.h"
#include "hash.h"
-//-----------------------------------------------
-// Id's with relation
+/*-----------------------------------------------
+ * Ids with relation
+ */
typedef struct _Reldep {
Id name; // "package"
@@ -25,16 +26,47 @@ typedef struct _Reldep {
int flags; // operation/relation, see REL_x in pool.h
} Reldep;
-extern Id str2id(Pool *pool, const char *, int);
-extern Id strn2id(Pool *pool, const char *, unsigned int, int);
-extern Id rel2id(Pool *pool, Id, Id, int, int);
-extern const char *id2str(const Pool *pool, Id);
-extern const char *dep2str(Pool *pool, Id); /* might alloc tmpspace */
-extern const char *id2rel(const Pool *pool, Id);
-extern const char *id2evr(const Pool *pool, Id);
+extern Id pool_str2id(Pool *pool, const char *, int);
+extern Id pool_strn2id(Pool *pool, const char *, unsigned int, int);
+extern Id pool_rel2id(Pool *pool, Id, Id, int, int);
+extern const char *pool_id2str(const Pool *pool, Id);
+extern const char *pool_id2rel(const Pool *pool, Id);
+extern const char *pool_id2evr(const Pool *pool, Id);
+extern const char *pool_dep2str(Pool *pool, Id); /* might alloc tmpspace */
extern void pool_shrink_strings(Pool *pool);
extern void pool_shrink_rels(Pool *pool);
extern void pool_freeidhashes(Pool *pool);
+
+/* 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);
+}
+
#endif /* SATSOLVER_POOLID_H */