diff options
author | Michael Schroeder <mls@suse.de> | 2012-02-06 14:28:10 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-02-06 14:28:10 +0100 |
commit | 11a30e727b3bf2794fd6e0f3107b7f1b3d566bcb (patch) | |
tree | 81f5e20ef1845f0ac5829319208295a63af03822 /ext/repo_zyppdb.c | |
parent | 325a39ce28b21392e20bcaa8308012c97f8523ee (diff) | |
download | libsolv-11a30e727b3bf2794fd6e0f3107b7f1b3d566bcb.tar.gz libsolv-11a30e727b3bf2794fd6e0f3107b7f1b3d566bcb.tar.bz2 libsolv-11a30e727b3bf2794fd6e0f3107b7f1b3d566bcb.zip |
- get rid of static variables used by join2
Diffstat (limited to 'ext/repo_zyppdb.c')
-rw-r--r-- | ext/repo_zyppdb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/repo_zyppdb.c b/ext/repo_zyppdb.c index 8882fce..f969160 100644 --- a/ext/repo_zyppdb.c +++ b/ext/repo_zyppdb.c @@ -79,6 +79,7 @@ struct parsedata { struct stateswitch *swtab[NUMSTATES]; enum state sbtab[NUMSTATES]; + struct joindata jd; const char *tmplang; @@ -173,7 +174,7 @@ startElement(void *userData, const char *name, const char **atts) const char *ver = find_attr("ver", atts, 0); const char *rel = find_attr("rel", atts, 0); /* const char *epoch = find_attr("epoch", atts, 1); ignored */ - s->evr = makeevr(pd->pool, join2(ver, "-", rel)); + s->evr = makeevr(pd->pool, join2(&pd->jd, ver, "-", rel)); } break; /* <summary lang="xy">... */ @@ -219,7 +220,7 @@ endElement(void *userData, const char *name) pd->solvable = 0; break; case STATE_NAME: - s->name = pool_str2id(pd->pool, join2("product", ":", pd->content), 1); + s->name = pool_str2id(pd->pool, join2(&pd->jd, "product", ":", pd->content), 1); break; case STATE_ARCH: s->arch = pool_str2id(pd->pool, pd->content, 1); @@ -342,7 +343,7 @@ repo_add_zyppdb_products(Repo *repo, const char *dirpath, int flags) { if (strlen(entry->d_name) < 3) continue; /* skip '.' and '..' */ - fullpath = join2(dirpath, "/", entry->d_name); + fullpath = join2(&pd.jd, dirpath, "/", entry->d_name); if ((fp = fopen(fullpath, "r")) == 0) { perror(fullpath); @@ -356,7 +357,7 @@ repo_add_zyppdb_products(Repo *repo, const char *dirpath, int flags) solv_free((void *)pd.tmplang); free(pd.content); - join_freemem(); + join_freemem(&pd.jd); if (!(flags & REPO_NO_INTERNALIZE)) repodata_internalize(data); } |