Mercurial > octave
changeset 27405:646efbb5f407
avoid including builtin-defun-decls.h unless needed
Also audit all GUI files to ensure that any built-in DEFUN functions
are called from the interpreter thread using an interpreter_event
signal and that there are no lurking calls to eval or feval now.
* file-editor-tab.cc: Include builtin-defun-decls.h here, not in
file-editor-tab.h
* files-dock-widget.cc, qt-application.cc: Don't include
builtin-defun-decls.h.
* main-window.cc (main_window::handle_open_any_request):
Use interpreter::feval instead of global feval function.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 13 Sep 2019 08:11:53 -0400 |
parents | a3ec8c75ece3 |
children | af456aa48308 |
files | libgui/src/files-dock-widget.cc libgui/src/m-editor/file-editor-tab.cc libgui/src/m-editor/file-editor-tab.h libgui/src/main-window.cc libgui/src/qt-application.cc |
diffstat | 5 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/files-dock-widget.cc Fri Sep 13 08:02:45 2019 -0400 +++ b/libgui/src/files-dock-widget.cc Fri Sep 13 08:11:53 2019 -0400 @@ -47,7 +47,6 @@ #include "qt-interpreter-events.h" -#include "builtin-defun-decls.h" #include "interpreter.h" #include "load-save.h" #include "oct-env.h"
--- a/libgui/src/m-editor/file-editor-tab.cc Fri Sep 13 08:02:45 2019 -0400 +++ b/libgui/src/m-editor/file-editor-tab.cc Fri Sep 13 08:11:53 2019 -0400 @@ -73,6 +73,7 @@ #include "uniconv-wrappers.h" #include "bp-table.h" +#include "builtin-defun-decls.h" #include "interpreter-private.h" #include "interpreter.h" #include "load-path.h" @@ -777,6 +778,8 @@ emit interpreter_event ([this, octave_functions, octave_builtins] (interpreter& interp) { + // INTERPRETER THREAD + QStringList api_entries; octave_value_list tmp = Fiskeyword ();
--- a/libgui/src/m-editor/file-editor-tab.h Fri Sep 13 08:02:45 2019 -0400 +++ b/libgui/src/m-editor/file-editor-tab.h Fri Sep 13 08:11:53 2019 -0400 @@ -41,8 +41,6 @@ #include "marker.h" #include "qt-interpreter-events.h" -#include "builtin-defun-decls.h" - class octave_value_list; namespace octave
--- a/libgui/src/main-window.cc Fri Sep 13 08:02:45 2019 -0400 +++ b/libgui/src/main-window.cc Fri Sep 13 08:11:53 2019 -0400 @@ -395,7 +395,7 @@ { // INTERPRETER THREAD - feval ("open", ovl (file)); + interp.feval ("open", ovl (file)); // Update the workspace since open.m may have loaded new // variables.