diff options
Diffstat (limited to 'octave-4.3-compat.diff')
-rw-r--r-- | octave-4.3-compat.diff | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/octave-4.3-compat.diff b/octave-4.3-compat.diff deleted file mode 100644 index 3db5404425b0..000000000000 --- a/octave-4.3-compat.diff +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/pure-octave/embed.cc b/pure-octave/embed.cc -index 94bb666b..bae774f6 100644 ---- a/pure-octave/embed.cc -+++ b/pure-octave/embed.cc -@@ -98,6 +98,35 @@ static void my_clean_up_and_exit(int exit_status, bool safe_to_return) - embedded_interpreter = 0; - } - } -+ -+// other recent breakage in the 4.3 API: -+#define is_bool_type islogical -+#define is_integer_type isinteger -+#define is_complex_type iscomplex -+ -+#define get_global_value myget_global_value -+#define set_global_value myset_global_value -+ -+octave_value -+get_global_value (const std::string& nm, bool silent) -+{ -+ octave::symbol_table& symtab = embedded_interpreter->get_symbol_table(); -+ -+ octave_value val = symtab.global_varval (nm); -+ -+ if (val.is_undefined () && ! silent) -+ error ("get_global_value: undefined symbol '%s'", nm.c_str ()); -+ -+ return val; -+} -+ -+void -+set_global_value (const std::string& nm, const octave_value& val) -+{ -+ octave::symbol_table& symtab = embedded_interpreter->get_symbol_table(); -+ -+ symtab.global_assign (nm, val); -+} - #endif - - static void install_builtins(); -@@ -843,7 +872,12 @@ pure_expr *octave_func(pure_expr *fun) - // First try to find an ordinary function handle. - char *s; - if (pure_is_cstring_dup(fun, &s)) { -+#if OCTAVE_MAJOR>4 || OCTAVE_MAJOR>=4 && OCTAVE_MINOR>=3 -+ octave::symbol_table& symtab = embedded_interpreter->get_symbol_table(); -+ octave_value f = symtab.find_function(s); -+#else - octave_value f = symbol_table::find_function(s); -+#endif - free(s); - if (f.is_defined()) { - pure_expr *f = pure_string_dup("str2func"), |