diff src/DLD-FUNCTIONS/daspk.cc @ 10066:2cd940306a06

make unwind_protect frames local
author Jaroslav Hajek <highegg@gmail.com>
date Wed, 06 Jan 2010 13:18:41 +0100
parents 610bf90fce2a
children 40dfc0c99116
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/daspk.cc
+++ b/src/DLD-FUNCTIONS/daspk.cc
@@ -153,12 +153,7 @@
 }
 
 #define DASPK_ABORT() \
-  do \
-    { \
-      unwind_protect::run_frame (uwp_frame); \
-      return retval; \
-    } \
-  while (0)
+  return retval
 
 #define DASPK_ABORT1(msg) \
   do \
@@ -280,9 +275,9 @@
   warned_fcn_imaginary = false;
   warned_jac_imaginary = false;
 
-  unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
+  unwind_protect frame;
 
-  unwind_protect::protect_var (call_depth);
+  frame.protect_var (call_depth);
   call_depth++;
 
   if (call_depth > 1)
@@ -480,8 +475,6 @@
   else
     print_usage ();
 
-  unwind_protect::run_frame (uwp_frame);
-
   return retval;
 }