diff src/graphics.cc @ 9396:17af7cce7d1b

yet more unwind_protect improvements
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 25 Jun 2009 13:57:38 +0200
parents 610bf90fce2a
children 4af6e29449c1
line wrap: on
line diff
--- a/src/graphics.cc
+++ b/src/graphics.cc
@@ -4190,7 +4190,7 @@
     args(1) = Matrix ();
 
   unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-  unwind_protect::add (gh_manager::restore_gcbo);
+  unwind_protect::add_fcn (gh_manager::restore_gcbo);
 
   if (true)
     {
@@ -4989,12 +4989,6 @@
   return octave_value (graphics_backend::available_backends_list ());
 }
 
-static void
-clear_drawnow_request (void *)
-{
-  Vdrawnow_requested = false;
-}
-
 DEFUN (drawnow, args, ,
    "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} drawnow ()\n\
@@ -5016,7 +5010,7 @@
   gh_manager::lock ();
 
   unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
-  unwind_protect::add (clear_drawnow_request);
+  unwind_protect::protect_var (Vdrawnow_requested, false);
 
   unwind_protect::protect_var (drawnow_executing);