summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2023-03-25 09:40:38 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2023-03-25 09:40:38 +0000
commit3462d100563fb0632e21fe53e90bb91b3d11fe76 (patch)
treea2260bec3abf2ed56680afec26fd6c82d7c13124 /Lib
parent8cb29ef20a074353ddc5bb65698f25e696840cf6 (diff)
parentae072d6585bc95ca16cdc0e19f4e227a2ba0a2eb (diff)
downloadswig-3462d100563fb0632e21fe53e90bb91b3d11fe76.tar.gz
Merge branch 'alatina-master'
* alatina-master: Update octruntime.swg Update octrun.swg to work with Octave v8.1.0 Update octruntime.swg to work with Octave v8.1.0
Diffstat (limited to 'Lib')
-rw-r--r--Lib/octave/octrun.swg6
-rw-r--r--Lib/octave/octruntime.swg5
2 files changed, 9 insertions, 2 deletions
diff --git a/Lib/octave/octrun.swg b/Lib/octave/octrun.swg
index 2973318c4..27389d577 100644
--- a/Lib/octave/octrun.swg
+++ b/Lib/octave/octrun.swg
@@ -1630,8 +1630,12 @@ SWIGRUNTIME void SWIG_Octave_LinkGlobalValue(std::string name) {
octave::interpreter *interp = octave::interpreter::the_interpreter ();
interp->assign(name, interp->global_varval(name));
octave::tree_evaluator& tree_eval = interp->get_evaluator();
+#if SWIG_OCTAVE_PREREQ(8,0,0)
+ std::shared_ptr<octave::stack_frame> stackFrame = tree_eval.get_current_stack_frame();
+#else
octave::call_stack& callStack = tree_eval.get_call_stack();
- std::shared_ptr<octave::stack_frame> stackFrame = callStack.get_current_stack_frame();
+ std::shared_ptr<octave::stack_frame> stackFrame = tree_eval.get_current_stack_frame();
+#endif
octave::symbol_record sym=symscope.lookup_symbol(name);
stackFrame->mark_global(sym);
#else
diff --git a/Lib/octave/octruntime.swg b/Lib/octave/octruntime.swg
index e76151f14..94e2ca4fb 100644
--- a/Lib/octave/octruntime.swg
+++ b/Lib/octave/octruntime.swg
@@ -318,7 +318,10 @@ DEFUN_DLD( SWIG_name, args, nargout, SWIG_name_usage ) {
SWIG_InitializeModule(0);
SWIG_PropagateClientData();
-#if SWIG_OCTAVE_PREREQ(6,0,0)
+#if SWIG_OCTAVE_PREREQ(8,0,0)
+ octave::tree_evaluator& tree_eval = octave::interpreter::the_interpreter()->get_evaluator();
+ octave_function *me = tree_eval.current_function();
+#elif SWIG_OCTAVE_PREREQ(6,0,0)
octave::tree_evaluator& tree_eval = octave::interpreter::the_interpreter()->get_evaluator();
octave::call_stack& stack = tree_eval.get_call_stack();
octave_function *me = stack.current_function();