aboutsummaryrefslogtreecommitdiffhomepage
path: root/function.cpp
diff options
context:
space:
mode:
authorGravatar Konrad Borowski <glitchmr@myopera.com>2013-10-12 21:55:11 +0200
committerGravatar Konrad Borowski <glitchmr@myopera.com>2013-10-12 21:55:23 +0200
commit1349d129c51e0c698645c3806601a7c9ebfcef95 (patch)
tree09ce29693c9ca3551cb899d208f02930bc301013 /function.cpp
parent97e731e05cd696b8b286899f38239d68c67ef181 (diff)
Fix #213. You can now remove autoloaded functions.
Oddly enough, the code is here, but is internal function.
Diffstat (limited to 'function.cpp')
-rw-r--r--function.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/function.cpp b/function.cpp
index 08fb8556..da7574d3 100644
--- a/function.cpp
+++ b/function.cpp
@@ -61,9 +61,6 @@ function_autoload_t::function_autoload_t() : autoload_t(L"fish_function_path", N
{
}
-/** Removes a function from our internal table, returning true if it was found and false if not */
-static bool function_remove_ignore_autoload(const wcstring &name);
-
/** Callback when an autoloaded function is removed */
void function_autoload_t::command_removed(const wcstring &cmd)
{
@@ -220,7 +217,7 @@ int function_exists_no_autoload(const wcstring &cmd, const env_vars_snapshot_t &
return loaded_functions.find(cmd) != loaded_functions.end() || function_autoloader.can_load(cmd, vars);
}
-static bool function_remove_ignore_autoload(const wcstring &name)
+bool function_remove_ignore_autoload(const wcstring &name)
{
scoped_lock lock(functions_lock);
bool erased = (loaded_functions.erase(name) > 0);