Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=cfpm.git;a=commitdiff;h=d930f7126908c82fa0497edd96a8f1d0fb513c1c

commit d930f7126908c82fa0497edd96a8f1d0fb513c1c
Author: Priyank <priy...@frugalware.org>
Date:   Mon Jun 8 12:51:07 2009 +0530

changes in class Database
* getGroupCache(), getPackageCache() should return non-freeable lists

diff --git a/pm.cc b/pm.cc
index a0e2268..90ea6e4 100644
--- a/pm.cc
+++ b/pm.cc
@@ -158,7 +158,8 @@ GroupList* Database::getGroupCache()
if ( isRegistered() )
{
PM_LIST *l = pacman_db_getgrpcache(db);
-               ( l ) && ( ret = new GroupList(l) );
+               /* create a new group list which shouldn't be freed */
+               ( l ) && ( ret = new GroupList(l,false) );
}
return ret;
}
@@ -170,7 +171,8 @@ PackageList* Database::getPackageCache()
if ( isRegistered() )
{
PM_LIST *l = pacman_db_getpkgcache(db);
-               ( l ) && ( ret = new PackageList(l) );
+               /* create a new package list which shouldn't be freed */
+               ( l ) && ( ret = new PackageList(l,false) );
}
return ret;
}
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to