diff main/fixed/src/ov-fixed-complex.cc @ 9481:d84d2fea3c90 octave-forge

Re-enable compilation of fixed package
author jordigh
date Wed, 22 Feb 2012 22:07:33 +0000
parents 0924c374b60d
children 58d36e8880db
line wrap: on
line diff
--- a/main/fixed/src/ov-fixed-complex.cc	Wed Feb 22 21:56:05 2012 +0000
+++ b/main/fixed/src/ov-fixed-complex.cc	Wed Feb 22 22:07:33 2012 +0000
@@ -228,9 +228,9 @@
 }
 
 static void
-restore_precision (void *p)
+restore_precision (int *p)
 {
-  bind_internal_variable ("output_precision", *(static_cast<int *> (p)));
+  bind_internal_variable ("output_precision", *p);
 }
 
 void
@@ -245,13 +245,15 @@
 
   octave_value_list tmp = feval ("output_precision");
   int prec = tmp(0).int_value ();
-  unwind_protect::add (restore_precision, &prec);
+
+  unwind_protect frame;
+
+  frame.add_fcn (restore_precision, &prec);
+
   bind_internal_variable ("output_precision", new_prec);
 
   indent (os);
   octave_print_internal (os, complex_value(), pr_as_read_syntax);
-
-  unwind_protect::run ();
 }
 
 bool