diff src/pr-output.cc @ 9377:610bf90fce2a

update unwind_protect usage everywhere
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 23 Jun 2009 08:22:13 +0200
parents 52b4d82e5b4f
children ddcc0da700b8
line wrap: on
line diff
--- a/src/pr-output.cc
+++ b/src/pr-output.cc
@@ -3204,9 +3204,9 @@
     print_usage ();
   else
     {
-      unwind_protect::begin_frame ("Frats");
-
-      unwind_protect_int (rat_string_len);
+      unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+
+      unwind_protect::protect_var (rat_string_len);
 
       rat_string_len = 9;
 
@@ -3219,7 +3219,7 @@
 
 	  if (arg.is_numeric_type ())
 	    {
-	      unwind_protect_bool (rat_format);
+	      unwind_protect::protect_var (rat_format);
 
 	      rat_format = true;
 
@@ -3254,7 +3254,7 @@
 	    error ("rats: expecting numeric input");
 	}
 
-      unwind_protect::run_frame ("Frats");
+      unwind_protect::run_frame (uwp_frame);
     }
 
   return retval;