diff --git a/src/autoload.cpp b/src/autoload.cpp index d1ce731d9..eb252277f 100644 --- a/src/autoload.cpp +++ b/src/autoload.cpp @@ -123,10 +123,8 @@ bool autoload_t::has_tried_loading(const wcstring &cmd) { } /// @return Whether this function is stale. -/// Internalized functions can never be stale. static bool is_stale(const autoload_function_t *func) { - return !func->is_internalized && - time(NULL) - func->access.last_checked > kAutoloadStalenessInterval; + return time(NULL) - func->access.last_checked > kAutoloadStalenessInterval; } autoload_function_t *autoload_t::get_autoloaded_function_with_creation(const wcstring &cmd, @@ -182,7 +180,7 @@ bool autoload_t::locate_file_and_maybe_load_it(const wcstring &cmd, bool really_ // If we can use this function, return whether we were able to access it. if (use_cached(func, really_load, allow_stale_functions)) { - return func->is_internalized || func->access.accessible; + return func->access.accessible; } } diff --git a/src/autoload.h b/src/autoload.h index 1370882ef..0705c5616 100644 --- a/src/autoload.h +++ b/src/autoload.h @@ -28,7 +28,7 @@ file_access_attempt_t access_file(const wcstring &path, int mode); struct autoload_function_t { explicit autoload_function_t(bool placeholder) - : access(), is_loaded(false), is_placeholder(placeholder), is_internalized(false) {} + : access(), is_loaded(false), is_placeholder(placeholder) {} /// The last access attempt recorded file_access_attempt_t access; @@ -37,8 +37,6 @@ struct autoload_function_t { /// Whether we are a placeholder that stands in for "no such function". If this is true, then /// is_loaded must be false. bool is_placeholder; - /// Whether this function came from a builtin "internalized" script. - bool is_internalized; }; class env_vars_snapshot_t;