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

Daniel Burrows dburrows at costa.debian.org
Tue Aug 9 00:55:03 UTC 2005


Author: dburrows
Date: Tue Aug  9 00:54:57 2005
New Revision: 3773

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/ui.cc
Log:
Weaken a bound reference.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Tue Aug  9 00:54:57 2005
@@ -1,5 +1,9 @@
 2005-08-08  Daniel Burrows  <dburrows at debian.org>
 
+	* src/ui.cc:
+
+	  Pre-emptively weaken a bound reference.
+
 	* src/view_changelog.cc:
 
 	  Update the changelog viewer for refcounting.

Modified: branches/aptitude-0.3/aptitude/src/ui.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/ui.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/ui.cc	Tue Aug  9 00:54:57 2005
@@ -2021,10 +2021,10 @@
 }
 
 static void do_prompt_string(const wstring &s,
-			     const vs_editline_ref &e,
+			     vs_editline &e,
 			     sigc::slot0<void> realslot)
 {
-  e->add_to_history(s);
+  e.add_to_history(s);
   realslot();
 }
 
@@ -2055,7 +2055,7 @@
 	e->entered.connect(*slot);
 
       e->entered.connect(sigc::bind(sigc::ptr_fun(do_prompt_string),
-				    e,
+				    e.weak_ref(),
 				    sigc::mem_fun(e.unsafe_get_ref(), &vscreen_widget::destroy)));
       if(changed_slot)
 	e->text_changed.connect(*changed_slot);



More information about the Aptitude-svn-commit mailing list