Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/deps.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-01-11 01:00:15 -0600
committerDan McGee <dan@archlinux.org>2008-01-11 22:58:05 -0600
commit3e133524a54ab55daff666d26c67ac288b605e92 (patch)
treecc1f0080c28d65ab5c029659a653658c52d748a7 /lib/libalpm/deps.h
parentccc1c731529de16f6fa4064fd992a8f63d7cfc26 (diff)
Add functions to manipulate pmdepend_t objects
We didn't have a free function before, causing some memory leaks. We also need a dup function now that strings are not in the structure but are dynamically allocated. Also adapt pmdepmissing_t to use a pointer to a depend struct instead of an inclusive one so we can use the functions we created here. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/deps.h')
-rw-r--r--lib/libalpm/deps.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h
index b20ea92f..debd5347 100644
--- a/lib/libalpm/deps.h
+++ b/lib/libalpm/deps.h
@@ -36,7 +36,7 @@ struct __pmdepend_t {
/* Missing dependency */
struct __pmdepmissing_t {
char *target;
- pmdepend_t depend;
+ pmdepend_t *depend;
};
/* Graphs */
@@ -48,8 +48,10 @@ struct __pmgraph_t {
alpm_list_t *childptr; /* points to a child in children list */
};
-pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdepmod_t depmod,
- const char *depname, const char *depversion);
+
+void _alpm_dep_free(pmdepend_t *dep);
+pmdepend_t *_alpm_dep_dup(const pmdepend_t *dep);
+pmdepmissing_t *_alpm_depmiss_new(const char *target, pmdepend_t *dep);
void _alpm_depmiss_free(pmdepmissing_t *miss);
alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode);
void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit);