diff src/pt-fcn-handle.h @ 8913:35cd375d4bb3

make tree::dup functions const
author John W. Eaton <jwe@octave.org>
date Thu, 05 Mar 2009 13:50:25 -0500
parents 73c4516fae10
children eb63fbe60fab
line wrap: on
line diff
--- a/src/pt-fcn-handle.h	Thu Mar 05 09:37:59 2009 +0100
+++ b/src/pt-fcn-handle.h	Thu Mar 05 13:50:25 2009 -0500
@@ -70,7 +70,7 @@
   octave_value_list rvalue (int nargout);
 
   tree_expression *dup (symbol_table::scope_id scope,
-			symbol_table::context_id context);
+			symbol_table::context_id context) const;
 
   void accept (tree_walker& tw);
 
@@ -110,22 +110,28 @@
 
   octave_value_list rvalue (int nargout);
 
-  tree_parameter_list *parameter_list (void)
+  tree_parameter_list *parameter_list (void) const
   {
     return fcn ? fcn->parameter_list () : 0;
   }
 
-  tree_parameter_list *return_list (void)
+  tree_parameter_list *return_list (void) const
   {
     return fcn ? fcn->return_list () : 0;
   }
 
-  tree_statement_list *body (void) { return fcn ? fcn->body () : 0; }
+  tree_statement_list *body (void) const
+  {
+    return fcn ? fcn->body () : 0;
+  }
 
-  symbol_table::scope_id scope (void) { return fcn ? fcn->scope () : -1; }
+  symbol_table::scope_id scope (void) const
+  {
+    return fcn ? fcn->scope () : -1;
+  }
 
   tree_expression *dup (symbol_table::scope_id scope,
-			symbol_table::context_id context);
+			symbol_table::context_id context) const;
 
   void accept (tree_walker& tw);