octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59422] SWIG failure against Octave 6.0


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #59422] SWIG failure against Octave 6.0
Date: Fri, 6 Nov 2020 10:02:46 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #1, bug #59422 (project octave):

The Octave parse tree evaluator was rewritten for version 6 and I could not
see a way to provide an interface that is completely compatible with previous
versions, so marking some functions as deprecated and simultaneously providing
new and old interfaces to these internals did not seem to be an option.

To work with Octave 6, octave_swig_bound_func will have to provide an execute
method.

You can ignore the error_state variable warnings as long as your code does not
depend on it ever being non-zero.  Instead, Octave's error function will throw
an octave::execution_exception exception.

It should be possible to replace oct_mach_info with octave::mach_info. 
oct_mach_info and related functions were deprecated in version 4.4.  However,
while there were some function names related to oct_mach_info that were
deprecated it looks like maybe the oct_mach_info typedef itself was not? 
Maybe we could restore that for another release or two?

Marking a symbol as global is now something that happens in a stack frame, not
the symbol scope, which is just the collection of variables attached to a
function, script, or the top-level workspace.  This confusion was a
long-standing problem in Octave that I believe is now fixed.  Maybe we could
provide a function in the symbol scope class that does the right thing, but 
it will be deprecated and eventually removed.

Likewise for the functions that provide access to global variables.  Those are
now something that belongs to the evaluator and there is access through the
interpreter class.  But maybe we could provide some deprecated functions in
the symbol table that would allow this SWIG code to continue to work.

I see no way to provide er
We might also be able to provide the call_stack::current function, but again,
it would be deprecated and eventually removed so this code will have to change
at some point.

It might also be possible to provide a discard_warning_messages global
variable (maybe a reference?) that allows direct access to the
error_system::m_discard_warning_messages internal variable, but again, it
would be deprecated and removed in a couple of releases.

The global discard_error_messages varaible no longer exists in Octave as
errors are printed when the exceptions they generate are caught, so setting a
variable to tell the error function to discard messages is no longer needed. 
But, similar to error_state, I suppose we could continue to provide the
variable so code using it will compile, but the variable will do nothing.  I
can't say whether that will allow SWIG code to work the same way as it did
previously.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59422>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]