diff src/utils.cc @ 10066:2cd940306a06

make unwind_protect frames local
author Jaroslav Hajek <highegg@gmail.com>
date Wed, 06 Jan 2010 13:18:41 +0100
parents f349847c4541
children 897e62651c0a
line wrap: on
line diff
--- a/src/utils.cc	Tue Jan 05 13:16:16 2010 +0100
+++ b/src/utils.cc	Wed Jan 06 13:18:41 2010 +0100
@@ -1368,9 +1368,9 @@
 
   if (! error_state)
     {
-      unwind_protect::frame_id_t uwp = unwind_protect::begin_frame ();
-      unwind_protect::protect_var (error_state);
-      unwind_protect::protect_var (discard_error_messages);
+      unwind_protect frame;
+      frame.protect_var (error_state);
+      frame.protect_var (discard_error_messages);
       discard_error_messages = true;
 
       try
@@ -1390,8 +1390,6 @@
         {
           retval = false;
         }
-
-      unwind_protect::run_frame (uwp);
     }
 
   return retval;