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

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

[Octave-bug-tracker] [bug #59451] Function handles become invalid if pat


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #59451] Function handles become invalid if path to function is removed
Date: Thu, 12 Nov 2020 14:16:51 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #5, bug #59451 (project octave):

As I understand things, lookup for simple function handles must be deferred
until they are used so that "fh = @foo" will work when the function foo is not
available on the path and then calling "fh ()" will later work if the
directory containing foo.m is added to the path.

Currently, Octave appears to be doing the search for the function referenced
by the handle each time the handle is used.  Instead, is the link to the
function supposed to be "sticky" once it is found?

Also, if the function is cleared, I assume it is supposed to be reloaded from
the location where it was found, even if that is no longer on the path?  Is
that correct?

Internally, I think a function handle needs to store something like a weak
pointer to the function that it references.  Then if the underlying function
is cleared, we detect that situation and reload (assuming the file defining
the function still exists and can be loaded).

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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