Mercurial > octave
changeset 23454:30b6eccd6708
use builtin-defun-decls.h to ensure declarations of interpreter functions
* error.cc, file-io.cc, strfind.cc, ov-cell.cc, ov-struct.cc,
oct-parse.in.yy: Include builtin-defun-decls.h. Eliminate local
declarations of interpreter functions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 28 Apr 2017 13:52:02 -0400 |
parents | 2eb7dc15f9fa |
children | 73ff72d3d603 |
files | libinterp/corefcn/error.cc libinterp/corefcn/file-io.cc libinterp/corefcn/strfind.cc libinterp/octave-value/ov-cell.cc libinterp/octave-value/ov-struct.cc libinterp/parse-tree/oct-parse.in.yy |
diffstat | 6 files changed, 9 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/error.cc Fri Apr 28 13:49:27 2017 -0400 +++ b/libinterp/corefcn/error.cc Fri Apr 28 13:52:02 2017 -0400 @@ -34,6 +34,7 @@ #include <string> #include "bp-table.h" +#include "builtin-defun-decls.h" #include "call-stack.h" #include "defun.h" #include "error.h"
--- a/libinterp/corefcn/file-io.cc Fri Apr 28 13:49:27 2017 -0400 +++ b/libinterp/corefcn/file-io.cc Fri Apr 28 13:52:02 2017 -0400 @@ -51,7 +51,6 @@ # include <zlib.h> #endif -#include "error.h" #include "file-ops.h" #include "file-stat.h" #include "lo-ieee.h" @@ -61,7 +60,9 @@ #include "tmpfile-wrapper.h" #include "unistd-wrappers.h" +#include "builtin-defun-decls.h" #include "defun.h" +#include "error.h" #include "errwarn.h" #include "file-io.h" #include "load-path.h"
--- a/libinterp/corefcn/strfind.cc Fri Apr 28 13:49:27 2017 -0400 +++ b/libinterp/corefcn/strfind.cc Fri Apr 28 13:52:02 2017 -0400 @@ -33,10 +33,11 @@ #include "oct-locbuf.h" #include "Cell.h" -#include "ov.h" +#include "builtin-defun-decls.h" #include "defun.h" +#include "errwarn.h" +#include "ov.h" #include "unwind-prot.h" -#include "errwarn.h" #include "utils.h" // This allows safe indexing with char.
--- a/libinterp/octave-value/ov-cell.cc Fri Apr 28 13:49:27 2017 -0400 +++ b/libinterp/octave-value/ov-cell.cc Fri Apr 28 13:52:02 2017 -0400 @@ -37,6 +37,7 @@ #include "quit.h" #include "oct-locbuf.h" +#include "builtin-defun-decls.h" #include "defun.h" #include "error.h" #include "mxarray.h" @@ -1274,11 +1275,6 @@ return ovl (args(0).is_cellstr ()); } -// Note that since Fcellstr calls Fiscellstr, we need to have -// Fiscellstr defined first (to provide a declaration) and also we -// should keep it in the same file (so we don't have to provide a -// declaration) and so we don't have to use feval to call it. - DEFUN (cellstr, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{cstr} =} cellstr (@var{strmat})
--- a/libinterp/octave-value/ov-struct.cc Fri Apr 28 13:49:27 2017 -0400 +++ b/libinterp/octave-value/ov-struct.cc Fri Apr 28 13:52:02 2017 -0400 @@ -27,6 +27,7 @@ #include <iostream> #include "Cell.h" +#include "builtin-defun-decls.h" #include "defun.h" #include "error.h" #include "errwarn.h" @@ -2038,11 +2039,6 @@ %!assert (cell2struct ({}, {"f"}, 3), struct ("f", {})) */ -// FIXME: we should be including builtin-defun-decls.h but doing that -// currently exposes a problem with dependencies in the the build system. -extern OCTINTERP_API octave_value_list -Fcellstr (const octave_value_list& = octave_value_list (), int = 0); - DEFUN (rmfield, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{sout} =} rmfield (@var{s}, "@var{f}")
--- a/libinterp/parse-tree/oct-parse.in.yy Fri Apr 28 13:49:27 2017 -0400 +++ b/libinterp/parse-tree/oct-parse.in.yy Fri Apr 28 13:52:02 2017 -0400 @@ -53,6 +53,7 @@ #include "quit.h" #include "Cell.h" +#include "builtin-defun-decls.h" #include "call-stack.h" #include "comment-list.h" #include "defaults.h"