[zypp-commit] r10896 - in /trunk/sat-solver/src: pool.c strpool.c strpool.h
Author: mlschroe Date: Mon Aug 25 15:12:59 2008 New Revision: 10896 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10896&view=rev Log: - add stringpool_free() Modified: trunk/sat-solver/src/pool.c trunk/sat-solver/src/strpool.c trunk/sat-solver/src/strpool.h Modified: trunk/sat-solver/src/pool.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/pool.c?rev=10896&r1=10895&r2=10896&view=diff ============================================================================== --- trunk/sat-solver/src/pool.c (original) +++ trunk/sat-solver/src/pool.c Mon Aug 25 15:12:59 2008 @@ -76,8 +76,7 @@ repo_freeallrepos(pool, 1); sat_free(pool->id2arch); sat_free(pool->solvables); - sat_free(pool->ss.stringspace); - sat_free(pool->ss.strings); + stringpool_free(&pool->ss); sat_free(pool->rels); queue_free(&pool->vendormap); for (i = 0; i < POOL_TMPSPACEBUF; i++) Modified: trunk/sat-solver/src/strpool.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/strpool.c?rev=10896&r1=10895&r2=10896&view=diff ============================================================================== --- trunk/sat-solver/src/strpool.c (original) +++ trunk/sat-solver/src/strpool.c Mon Aug 25 15:12:59 2008 @@ -39,6 +39,14 @@ } void +stringpool_free(Stringpool *ss) +{ + sat_free(ss->strings); + sat_free(ss->stringspace); + sat_free(ss->stringhashtbl); +} + +void stringpool_init_empty(Stringpool *ss) { const char *emptystrs[] = { Modified: trunk/sat-solver/src/strpool.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/strpool.h?rev=10896&r1=10895&r2=10896&view=diff ============================================================================== --- trunk/sat-solver/src/strpool.h (original) +++ trunk/sat-solver/src/strpool.h Mon Aug 25 15:12:59 2008 @@ -27,6 +27,7 @@ void stringpool_init(Stringpool *ss, const char *strs[]); void stringpool_init_empty(Stringpool *ss); void stringpool_clone(Stringpool *ss, Stringpool *from); +void stringpool_free(Stringpool *ss); Id stringpool_str2id (Stringpool *ss, const char *str, int create); Id stringpool_strn2id (Stringpool *ss, const char *str, unsigned int len, int create); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
mlschroe@svn.opensuse.org