Mercurial > octave
changeset 28199:7ac8b3188b27
maint: merge stable to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 08 Apr 2020 16:03:51 -0400 |
parents | 20dea4a919c0 (current diff) 52b2680e091c (diff) |
children | b8384ed4d500 |
files | |
diffstat | 3 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/__init_fltk__.cc Wed Apr 08 16:00:54 2020 -0400 +++ b/libinterp/dldfcn/__init_fltk__.cc Wed Apr 08 16:03:51 2020 -0400 @@ -2484,11 +2484,14 @@ #endif -DEFMETHOD_DLD (__fltk_check__, interp, , , - doc: /* -*- texinfo -*- -@deftypefn {} {} __fltk_check__ () -Undocumented internal function. Calls Fl::check () -@end deftypefn */) +// This function has the same type signature as a builtin function so +// that we can create a function handle from it but it is not defined +// using a DEFMETHOD macro so that it will be omitted from the list of +// autoloaded functions in the PKG_ADD file and will not be visible to +// the interpreter. + +static octave_value_list +F__fltk_check__ (octave::interpreter& interp, const octave_value_list&, int) { #if defined (HAVE_FLTK) Fl::check ();
--- a/libinterp/octave-value/ov-fcn-handle.h Wed Apr 08 16:00:54 2020 -0400 +++ b/libinterp/octave-value/ov-fcn-handle.h Wed Apr 08 16:03:51 2020 -0400 @@ -97,6 +97,8 @@ bool is_function_handle (void) const { return true; } + bool is_anonymous (void) const { return m_name == anonymous; } + bool is_nested (void) const { return m_is_nested; } dim_vector dims (void) const;
--- a/libinterp/octave-value/ov-usr-fcn.cc Wed Apr 08 16:00:54 2020 -0400 +++ b/libinterp/octave-value/ov-usr-fcn.cc Wed Apr 08 16:03:51 2020 -0400 @@ -792,9 +792,8 @@ if (func.is_function_handle ()) { octave_fcn_handle *fh = func.fcn_handle_value (); - std::string fh_nm = fh->fcn_name (); - if (fh_nm == octave_fcn_handle::anonymous) + if (fh->is_anonymous ()) return ovl (-1); }