Octave: drop support for Octave versions older than 3.2.0
- Latest non-supported version is 3.0.5, released 2009-04-09 - Earliest supported version is 3.2.0, released 2009-06-05
This commit is contained in:
parent
56fefcc7e0
commit
952eee8f59
6 changed files with 16 additions and 25 deletions
|
|
@ -101,6 +101,11 @@
|
|||
|
||||
#endif // !defined(OCTAVE_MAJOR_VERSION)
|
||||
|
||||
// Set minimum supported Octave version
|
||||
#if !SWIG_OCTAVE_PREREQ(3,2,0)
|
||||
#error This version of SWIG supports only Octave version 3.2.0 or later
|
||||
#endif
|
||||
|
||||
// Octave_map was renamed to octave_map in v3.3.52
|
||||
#if !SWIG_OCTAVE_PREREQ(3,3,52)
|
||||
#define octave_map Octave_map
|
||||
|
|
@ -108,11 +113,7 @@
|
|||
|
||||
////////// Declare/define SWIG interface function loadable by Octave //////////
|
||||
|
||||
#if !SWIG_OCTAVE_PREREQ(3,2,0)
|
||||
#define SWIG_DEFUN(cname, wname, doc) DEFUNX_DLD(#cname, wname, FS ## cname, args, nargout, doc)
|
||||
#else
|
||||
#define SWIG_DEFUN(cname, wname, doc) DEFUNX_DLD(#cname, wname, G ## cname, args, nargout, doc)
|
||||
#endif
|
||||
#define SWIG_DEFUN(cname, wname, doc) DEFUNX_DLD(#cname, wname, G ## cname, args, nargout, doc)
|
||||
|
||||
////////// Define visibility of Octave runtime functions //////////
|
||||
|
||||
|
|
|
|||
|
|
@ -130,14 +130,10 @@ SWIGOCTRT void SWIG_Octave_SetGlobalValue(std::string name, const octave_value&
|
|||
|
||||
SWIGOCTRT void SWIG_Octave_LinkGlobalValue(std::string name)
|
||||
{
|
||||
#if !SWIG_OCTAVE_PREREQ(3,2,0)
|
||||
link_to_global_variable(curr_sym_tab->lookup(name, true));
|
||||
#else
|
||||
#if !SWIG_OCTAVE_PREREQ(3,8,0)
|
||||
symbol_table::varref(name);
|
||||
#endif
|
||||
symbol_table::mark_global(name);
|
||||
#endif
|
||||
}
|
||||
|
||||
SWIGOCTRT swig_module_info* SWIG_Octave_GetModule(void* clientdata)
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ DEFUN_DLD(SWIG_name, args, nargout, SWIG_name_usage)
|
|||
// definitely affects version 3.2.*, not sure about 3.3.*, seems to be fixed in
|
||||
// version 3.4.* and above. can be turned off with macro definition.
|
||||
#ifndef SWIG_OCTAVE_NO_SEGFAULT_HACK
|
||||
#if SWIG_OCTAVE_PREREQ(3,2,0) && !SWIG_OCTAVE_PREREQ(3,4,1)
|
||||
#if !SWIG_OCTAVE_PREREQ(3,4,1)
|
||||
octave_exit = ::_Exit;
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -311,7 +311,6 @@ DEFUN_DLD(SWIG_name, args, nargout, SWIG_name_usage)
|
|||
|
||||
// workaround bug in octave where installing global variable of custom type and then
|
||||
// exiting without explicitly clearing the variable causes octave to segfault.
|
||||
#if SWIG_OCTAVE_PREREQ(3,2,0)
|
||||
octave_value_list eval_args;
|
||||
eval_args.append("base");
|
||||
eval_args.append("function __swig_atexit__; "
|
||||
|
|
@ -325,7 +324,6 @@ DEFUN_DLD(SWIG_name, args, nargout, SWIG_name_usage)
|
|||
"atexit(\"__swig_atexit__\", false); "
|
||||
"atexit(\"__swig_atexit__\")");
|
||||
feval("evalin", eval_args, 0);
|
||||
#endif
|
||||
|
||||
SwigOctRef::register_type();
|
||||
SwigOctPacked::register_type();
|
||||
|
|
@ -398,11 +396,7 @@ DEFUN_DLD(SWIG_name, args, nargout, SWIG_name_usage)
|
|||
}
|
||||
}
|
||||
|
||||
#if !SWIG_OCTAVE_PREREQ(3,2,0)
|
||||
mlock(me->name());
|
||||
#else
|
||||
mlock();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue