diff libinterp/corefcn/help.cc @ 27202:23962b243bad

eliminate direct access to call stack in help functions * pt-eval.h, pt-eval.cc (tree_evaluator::debug_user_code): New function. * help.cc (help_system::local_functions, Flocalfunctions): Eliminate direct access to call stack.
author John W. Eaton <jwe@octave.org>
date Mon, 01 Apr 2019 17:47:24 +0000
parents 84ff9953faa1
children 682695bd0e98
line wrap: on
line diff
--- a/libinterp/corefcn/help.cc	Mon Apr 01 17:39:42 2019 +0000
+++ b/libinterp/corefcn/help.cc	Mon Apr 01 17:47:24 2019 +0000
@@ -44,7 +44,6 @@
 
 #include "Cell.h"
 #include "builtin-defun-decls.h"
-#include "call-stack.h"
 #include "defaults.h"
 #include "defun.h"
 #include "dirfns.h"
@@ -487,9 +486,9 @@
   {
     string_vector retval;
 
-    call_stack& cs = m_interpreter.get_call_stack ();
+    tree_evaluator& tw = m_interpreter.get_evaluator ();
 
-    octave_user_code *curr_fcn = cs.current_user_code ();
+    octave_user_code *curr_fcn = tw.current_user_code ();
 
     if (! curr_fcn)
       return retval;
@@ -812,8 +811,8 @@
   Cell retval;
 
   // Find the main function we are in.
-  octave::call_stack& cs = interp.get_call_stack ();
-  octave_user_code *parent_fcn = cs.debug_user_code ();
+  octave::tree_evaluator& tw = interp.get_evaluator ();
+  octave_user_code *parent_fcn = tw.debug_user_code ();
 
   if (! parent_fcn)
     return ovl (retval);