changeset 4974:ff29117ce225

[project @ 2004-09-08 17:23:22 by jwe]
author jwe
date Wed, 08 Sep 2004 17:23:23 +0000
parents c969a018c928
children 80842ad3f85c
files src/ChangeLog src/pt-arg-list.cc
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Sep 08 17:07:11 2004 +0000
+++ b/src/ChangeLog	Wed Sep 08 17:23:23 2004 +0000
@@ -1,3 +1,9 @@
+2004-09-08  John W. Eaton  <jwe@octave.org>
+
+	* pt-arg-list.cc (convert_to_const_vector):
+	Unwind-protect index_position before modifying it.
+	Don't protect and set index_position unless stash_object is true.
+
 2004-09-08  David Bateman  <dbateman@free.fr>
 
 	* ov-fcn-inline.cc (octave_fcn_inline::save_ascii,
--- a/src/pt-arg-list.cc	Wed Sep 08 17:07:11 2004 +0000
+++ b/src/pt-arg-list.cc	Wed Sep 08 17:23:23 2004 +0000
@@ -195,7 +195,12 @@
   int j = 0;
   for (int k = 0; k < len; k++)
     {
-      index_position = (len == 1) ? -1 : k;
+      if (stash_object)
+	{
+	  unwind_protect_int (index_position);
+
+	  index_position = (len == 1) ? -1 : k;
+	}
 
       tree_expression *elt = *p++;