From a46909a414ee9a1fd3e1996066111774e852557e Mon Sep 17 00:00:00 2001 From: Karl Wette Date: Tue, 31 Jan 2017 11:43:42 +1300 Subject: [PATCH] Lib/octave: call octave::feval() instead of feval() for Octave >= 4.4 --- Lib/octave/octruntime.swg | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Lib/octave/octruntime.swg b/Lib/octave/octruntime.swg index 96f7399f9..e468eb49e 100644 --- a/Lib/octave/octruntime.swg +++ b/Lib/octave/octruntime.swg @@ -139,7 +139,11 @@ SWIGINTERN bool SWIG_Octave_LoadModule(std::string name) { #endif #if SWIG_OCTAVE_PREREQ(4,2,0) try { +#if SWIG_OCTAVE_PREREQ(4,4,0) + octave::feval(name, octave_value_list(), 0); +#else feval(name, octave_value_list(), 0); +#endif retn = true; } catch (octave::execution_exception&) { } #else @@ -181,7 +185,11 @@ SWIGINTERN bool SWIG_Octave_InstallFunction(octave_function *octloadfcn, std::st args.append(octloadfcn->fcn_file_name()); #if SWIG_OCTAVE_PREREQ(4,2,0) try { +#if SWIG_OCTAVE_PREREQ(4,4,0) + octave::feval("autoload", args, 0); +#else feval("autoload", args, 0); +#endif retn = true; } catch (octave::execution_exception&) { } #else @@ -351,7 +359,11 @@ DEFUN_DLD( SWIG_name, args, nargout, SWIG_name_usage ) { "__swig_atexit__; " "atexit(\"__swig_atexit__\", false); " "atexit(\"__swig_atexit__\")"); +#if SWIG_OCTAVE_PREREQ(4,4,0) + octave::feval("evalin", eval_args, 0); +#else feval("evalin", eval_args, 0); +#endif #endif octave_swig_ref::register_type();