[Aptitude-svn-commit] r3766 - in branches/aptitude-0.3/aptitude: . src

Daniel Burrows dburrows at costa.debian.org
Tue Aug 9 00:08:02 UTC 2005


Author: dburrows
Date: Tue Aug  9 00:07:58 2005
New Revision: 3766

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/dep_item.h
Log:
Update pkg_dep_screen to the reference-counting protocol.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Tue Aug  9 00:07:58 2005
@@ -1,5 +1,9 @@
 2005-08-08  Daniel Burrows  <dburrows at debian.org>
 
+	* src/dep_item.h:
+
+	  Update pkg_dep_screen for the reference-counting protocol.
+
 	* src/download_manager.cc:
 
 	  Doh, set_widget isn't a constructor, don't write it like one.

Modified: branches/aptitude-0.3/aptitude/src/dep_item.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/dep_item.h	(original)
+++ branches/aptitude-0.3/aptitude/src/dep_item.h	Tue Aug  9 00:07:58 2005
@@ -1,6 +1,6 @@
 // dep_item.h (This is -*-c++-*-)
 //
-//  Copyright 1999,2000,2001 Daniel Burrows
+//  Copyright 1999, 2000, 2001, 2005 Daniel Burrows
 //
 //  This program is free software; you can redistribute it and/or modify
 //  it under the terms of the GNU General Public License as published by
@@ -56,12 +56,22 @@
 protected:
   vs_treeitem *setup_new_root(const pkgCache::PkgIterator &pkg,
 			      const pkgCache::VerIterator &ver);
-public:
+
   pkg_dep_screen(const pkgCache::PkgIterator &pkg,
 		 const pkgCache::VerIterator &ver,
 		 bool _reverse=false);
+public:
+  static ref_ptr<pkg_dep_screen>
+  create(const pkgCache::PkgIterator &pkg,
+	 const pkgCache::VerIterator &ver,
+	 bool reverse = false)
+  {
+    return new pkg_dep_screen(pkg, ver, reverse);
+  }
 
   virtual ~pkg_dep_screen() {}
 };
 
+typedef ref_ptr<pkg_dep_screen> pkg_dep_screen_ref;
+
 #endif



More information about the Aptitude-svn-commit mailing list