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

commit fabcde5f0541facad70284c43a35bb40d6d36157
Author: Priyank <priy...@frugalware.org>
Date:   Mon Jun 8 12:55:27 2009 +0530

updates in class List
* add a constructor that allows setting the freeable property

diff --git a/pm.cc b/pm.cc
index 90ea6e4..043f886 100644
--- a/pm.cc
+++ b/pm.cc
@@ -377,12 +377,21 @@ string Group::getName()
List::List()
{
list = NULL;
-
+       freeable = false;
}

List::List(PM_LIST *l)
{
-       list = l;
+       if ( l )
+       {
+               list = l;
+               freeable = true;
+       }
+}
+
+List::List(PM_LIST *l,bool freelist)
+{
+       ( l ) && ( list = l ) && ( freeable = freelist );
}

List::~List()
diff --git a/pm.hh b/pm.hh
index 5f44893..3ca6fa0 100644
--- a/pm.hh
+++ b/pm.hh
@@ -102,6 +102,7 @@ namespace PM
public:
List();
List(PM_LIST *l);
+                       List(PM_LIST *l,bool freelist);
~List();
int count();
bool first();
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to