diff src/ov-mapper.cc @ 4748:7b145222fea3

[project @ 2004-02-07 06:27:27 by jwe]
author jwe
date Sat, 07 Feb 2004 06:27:28 +0000
parents ef3a14fb6847
children 80842ad3f85c
line wrap: on
line diff
--- a/src/ov-mapper.cc
+++ b/src/ov-mapper.cc
@@ -35,6 +35,8 @@
 #include "oct-obj.h"
 #include "ov-mapper.h"
 #include "ov.h"
+#include "toplev.h"
+#include "unwind-prot.h"
 
 DEFINE_OCTAVE_ALLOCATOR (octave_mapper);
 
@@ -284,7 +286,14 @@
   else
     {
       if (args(0).is_defined ())
-	retval = apply (args(0));
+	{
+	  unwind_protect_ptr (curr_function);
+	  curr_function = this;
+
+	  retval = apply (args(0));
+
+	  unwind_protect::run ();
+	}
       else
 	::error ("%s: argument undefined", name().c_str ());
     }