[Aptitude-devel] r3047 - in branches/aptitude-0.3/aptitude: . src/generic/problemresolver

Daniel Burrows dburrows@costa.debian.org
Fri, 22 Apr 2005 23:41:02 +0000


Author: dburrows
Date: Fri Apr 22 23:41:00 2005
New Revision: 3047

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
Log:
Allow solutions to be explicitly invalidated.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Fri Apr 22 23:41:00 2005
@@ -1,6 +1,10 @@
 2005-04-22  Daniel Burrows  <dburrows@debian.org>
 
-	* src/broken_indicator.cc:
+	* src/generic/problemresolver/problemresolver.h:
+
+	  Add a method on solutions to explicitly invalidate them.
+
+	* src/broken_indicator.cc: 
 
 	  Doh, fix a compile error.
 

Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h	Fri Apr 22 23:41:00 2005
@@ -244,6 +244,14 @@
       real_soln->decref();
   }
 
+  /** Make this an invalid reference. */
+  void nullify()
+  {
+    if(real_soln)
+      real_soln->decref();
+    real_soln=0;
+  }
+
   generic_solution &operator=(const generic_solution &other)
   {
     if(other.real_soln)