# HG changeset patch # User jwe # Date 863190676 0 # Node ID ac3368dba5d3e8e2ce02b407663ce6309a53fa2e # Parent ca7d3625ee01e5de30505121e15345f2b509153d [project @ 1997-05-09 15:09:47 by jwe] diff --git a/src/defun-int.h b/src/defun-int.h --- a/src/defun-int.h +++ b/src/defun-int.h @@ -24,7 +24,6 @@ #define octave_defun_int_h 1 #include "oct-builtin.h" -#include "variables.h" // MAKE_BUILTINS is defined to extract function names and related // information and create the *.def files that are eventually used to diff --git a/src/defun.h b/src/defun.h --- a/src/defun.h +++ b/src/defun.h @@ -76,13 +76,8 @@ // How builtin variables are actually installed. #define DEFVAR_INT(name, sname, defn, inst_as_fcn, protect, sv_fcn, doc) \ - do \ - { \ - builtin_variable sname (name, octave_value (defn), inst_as_fcn, \ - protect, (sv_fcn != 0), sv_fcn, doc); \ - install_builtin_variable (sname); \ - } \ - while (0) + install_builtin_variable (name, octave_value (defn), inst_as_fcn, \ + protect, (sv_fcn != 0), sv_fcn, doc) // Define a builtin function. // diff --git a/src/ov-base.cc b/src/ov-base.cc --- a/src/ov-base.cc +++ b/src/ov-base.cc @@ -34,6 +34,7 @@ #include "gripes.h" #include "oct-map.h" +#include "oct-var-ref.h" #include "ops.h" #include "ov-base.h" #include "ov-scalar.h" diff --git a/src/ov-re-mat.cc b/src/ov-re-mat.cc --- a/src/ov-re-mat.cc +++ b/src/ov-re-mat.cc @@ -36,6 +36,7 @@ #include "gripes.h" #include "oct-obj.h" +#include "oct-var-ref.h" #include "ops.h" #include "ov-scalar.h" #include "ov-re-mat.h" diff --git a/src/ov-struct.cc b/src/ov-struct.cc --- a/src/ov-struct.cc +++ b/src/ov-struct.cc @@ -31,6 +31,7 @@ #include #include "error.h" +#include "oct-var-ref.h" #include "ov-struct.h" #include "unwind-prot.h" #include "variables.h" diff --git a/src/ov.cc b/src/ov.cc --- a/src/ov.cc +++ b/src/ov.cc @@ -31,6 +31,7 @@ #include "Array-flags.h" #include "str-vec.h" +#include "oct-var-ref.h" #include "ov.h" #include "ov-base.h" #include "ov-bool.h" diff --git a/src/variables.cc b/src/variables.cc --- a/src/variables.cc +++ b/src/variables.cc @@ -1533,14 +1533,17 @@ } void -install_builtin_variable (const builtin_variable& v) +install_builtin_variable (const string& name, const octave_value& value, + bool install_as_function, bool protect, + bool eternal, symbol_record::sv_function sv_fcn, + const string& help_string); { - if (v.install_as_function) - install_builtin_variable_as_function (v.name, v.value, v.protect, - v.eternal, v.help_string); + if (install_as_function) + install_builtin_variable_as_function (name, value, protect, + eternal, help_string); else - bind_builtin_variable (v.name, v.value, v.protect, v.eternal, - v.sv_fcn, v.help_string); + bind_builtin_variable (name, value, protect, eternal, + sv_fcn, help_string); } void diff --git a/src/variables.h b/src/variables.h --- a/src/variables.h +++ b/src/variables.h @@ -40,22 +40,6 @@ #include "ov.h" #include "symtab.h" -struct builtin_variable -{ - builtin_variable (const string& n, const octave_value& v, bool iaf, - bool p, bool e, sv_Function svf, const string& h) - : name (n), value (v), install_as_function (iaf), protect (p), - eternal (e), sv_fcn (svf), help_string (h) { } - - string name; - octave_value value; - bool install_as_function; - bool protect; - bool eternal; - symbol_record::sv_function sv_fcn; - string help_string; -}; - typedef octave_value_list (*Octave_builtin_fcn)(const octave_value_list&, int); extern void initialize_symbol_tables (void); @@ -114,7 +98,9 @@ install_builtin_function (octave_builtin *f, bool is_text_fcn = false); extern void -install_builtin_variable (const builtin_variable& v); +install_builtin_variable (const string& n, const octave_value& v, + bool iaf, bool p, bool e, + symbol_record::sv_function svf, const string& h); extern void install_builtin_variable_as_function (const string& name,