diff libinterp/corefcn/load-path.cc @ 26970:340d44f2f942

backout changeset 98f1a964ff33 This changeset broke lookups for functions in packages. It may make sense to cache packages differently or as load_path initialization finds +package directories, but this changeset was the wrong thing to do. My apologies.
author John W. Eaton <jwe@octave.org>
date Mon, 25 Mar 2019 18:28:24 +0000
parents 98f1a964ff33
children 097774bed4ed
line wrap: on
line diff
--- a/libinterp/corefcn/load-path.cc	Mon Mar 25 12:13:06 2019 -0700
+++ b/libinterp/corefcn/load-path.cc	Mon Mar 25 18:28:24 2019 +0000
@@ -1225,7 +1225,7 @@
   }
 
   void
-  load_path::dir_info::initialize (const std::string& parent_package)
+  load_path::dir_info::initialize (void)
   {
     is_relative = ! sys::env::absolute_pathname (dir_name);
 
@@ -1241,7 +1241,7 @@
         dir_mtime = fs.mtime ();
         dir_time_last_checked = sys::time ();
 
-        get_file_list (dir_name, parent_package);
+        get_file_list (dir_name);
 
         try
           {
@@ -1269,8 +1269,7 @@
   }
 
   void
-  load_path::dir_info::get_file_list (const std::string& d,
-                                      const std::string& parent_package)
+  load_path::dir_info::get_file_list (const std::string& d)
   {
     sys::dir_entry dir (d);
 
@@ -1303,14 +1302,7 @@
                     else if (fname[0] == '@')
                       get_method_file_map (full_name, fname.substr (1));
                     else if (fname[0] == '+')
-                      {
-                        std::string pkg_name = fname.substr (1);
-
-                        if (! parent_package.empty ())
-                          pkg_name = parent_package + "." + pkg_name;
-
-                        get_package_dir (full_name, pkg_name);
-                      }
+                      get_package_dir (full_name, fname.substr (1));
                   }
                 else
                   {
@@ -1368,12 +1360,7 @@
   load_path::dir_info::get_package_dir (const std::string& d,
                                         const std::string& package_name)
   {
-    symbol_table& symtab
-      = __get_symbol_table__ ("load_path::dir_info::get_package_dir");
-
-    symtab.install_package (package_name);
-
-    package_dir_map[package_name] = dir_info (d, package_name);
+    package_dir_map[package_name] = dir_info (d);
   }
 
   void