# HG changeset patch # User John W. Eaton # Date 1586376231 14400 # Node ID 7ac8b3188b2734b6cbcaedc732f84e12bca34aa0 # Parent 20dea4a919c024eb0299f4d0301f73bf416b1afc# Parent 52b2680e091cc0be0d78e25cddc764a7a07bdcc9 maint: merge stable to default. diff -r 20dea4a919c0 -r 7ac8b3188b27 libinterp/dldfcn/__init_fltk__.cc --- 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 (); diff -r 20dea4a919c0 -r 7ac8b3188b27 libinterp/octave-value/ov-fcn-handle.h --- 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; diff -r 20dea4a919c0 -r 7ac8b3188b27 libinterp/octave-value/ov-usr-fcn.cc --- 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); }