octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60237] Differente behaviour in anonymous func


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #60237] Differente behaviour in anonymous function handling
Date: Wed, 17 Mar 2021 13:14:13 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36 Edg/89.0.774.54

Update of bug #60237 (project octave):

                  Status:               Need Info => In Progress            
        Operating System:       Microsoft Windows => Any                    

    _______________________________________________________

Follow-up Comment #6:

Nice detective work!

If I read the current code correctly, `feval` should be called with the
octave_value if it is not clear if the argument is an (inline) function or a
function handle.
I'd guess that `args(0).is_function()` would evaluate to false in the case
where it fails. It's possible that in previous versions the argument was an
inline function while it is a function handle now.

This is probably something that should be fixed in NLOpt rather than in
Octave. But I'll leave this report open in case someone with a better insight
has a different opinion.

Wrt preparing a changeset for NLOpt: Afaict, ever since `feval` is a member
function of the interpreter, it also has an overload for an octave_value
argument.
Fwiw, an overload of `octave::feval` with an octave_value argument was
introduced in this changeset:
https://hg.savannah.gnu.org/hgweb/octave/rev/55916f99b8b6
I believe this was for Octave 5.

I hope that helps.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60237>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]