Octave module lets examples and tests work with Octave-6 * Try-catch replacement for check of error_state * Add execute method in addition to call * Replace oct_mach_info with octave::mach_info * Call from interpreter: global_varval global_assign * Assign a global name requires locating the stack which requires interpreter to tree evaluator to callStack * Do not use discard_error_messages or discard_warning_messages
This commit is contained in:
parent
852eab7db3
commit
81f9e6600f
3 changed files with 83 additions and 9 deletions
|
|
@ -19,7 +19,8 @@ static bool SWIG_init_user(octave_swig_type* module_ns);
|
|||
SWIGINTERN bool SWIG_Octave_LoadModule(std::string name) {
|
||||
bool retn = false;
|
||||
{
|
||||
#if SWIG_OCTAVE_PREREQ(4,2,0)
|
||||
#if SWIG_OCTAVE_PREREQ(6,0,0)
|
||||
#elif SWIG_OCTAVE_PREREQ(4,2,0)
|
||||
octave::unwind_protect frame;
|
||||
frame.protect_var(discard_error_messages); discard_error_messages = true;
|
||||
frame.protect_var(discard_warning_messages); discard_warning_messages = true;
|
||||
|
|
@ -62,7 +63,8 @@ SWIGINTERN bool SWIG_Octave_LoadModule(std::string name) {
|
|||
SWIGINTERN bool SWIG_Octave_InstallFunction(octave_function *octloadfcn, std::string name) {
|
||||
bool retn = false;
|
||||
{
|
||||
#if SWIG_OCTAVE_PREREQ(4,2,0)
|
||||
#if SWIG_OCTAVE_PREREQ(6,0,0)
|
||||
#elif SWIG_OCTAVE_PREREQ(4,2,0)
|
||||
octave::unwind_protect frame;
|
||||
frame.protect_var(discard_error_messages); discard_error_messages = true;
|
||||
frame.protect_var(discard_warning_messages); discard_warning_messages = true;
|
||||
|
|
@ -316,7 +318,11 @@ DEFUN_DLD( SWIG_name, args, nargout, SWIG_name_usage ) {
|
|||
SWIG_InitializeModule(0);
|
||||
SWIG_PropagateClientData();
|
||||
|
||||
#if SWIG_OCTAVE_PREREQ(4,4,0)
|
||||
#if 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();
|
||||
#elif SWIG_OCTAVE_PREREQ(4,4,0)
|
||||
octave::call_stack& stack = octave::interpreter::the_interpreter()->get_call_stack();
|
||||
octave_function *me = stack.current();
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue