octave-maintainers
[Top][All Lists]
Advanced

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

PKG_DEL execution order


From: John W. Eaton
Subject: PKG_DEL execution order
Date: Fri, 24 Aug 2007 11:31:00 -0400

On 24-Aug-2007, Michael Goffioul wrote:

| It seems that PKG_DEL is executed after having removed the path from the
| current load path. This is a problem if the PKG_DEL relies on functions 
located
| in the removed path. Is there a reason for this late execution of PKG_DEL?

No, there is no particular reason that it is last.  Does the following
change help?

jwe

src/ChangeLog:

2007-08-24  John W. Eaton  <address@hidden>

        * load-path.cc (load_path::do_remove): Call remove_hook function
        before removing directory from list.


Index: src/load-path.cc
===================================================================
RCS file: /cvs/octave/src/load-path.cc,v
retrieving revision 1.19
diff -u -u -r1.19 load-path.cc
--- src/load-path.cc    31 May 2007 19:44:45 -0000      1.19
+++ src/load-path.cc    24 Aug 2007 15:27:40 -0000
@@ -552,6 +552,9 @@
            {
              retval = true;
 
+             if (remove_hook)
+               remove_hook (dir);
+
              string_vector fcn_files = i->fcn_files;
 
              dir_info_list.erase (i);
@@ -590,9 +593,6 @@
                        }
                    }
                }
-
-             if (remove_hook)
-               remove_hook (dir);
            }
        }
     }

reply via email to

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