static bool function_remove_ignore_autoload(const wcstring &name) { scoped_lock lock(functions_lock); bool erased = (loaded_functions.erase(name) > 0); if (erased) { event_t ev(EVENT_ANY); ev.function_name=name; event_remove( &ev ); } return erased; }
static bool function_remove_ignore_autoload(const wcstring &name, bool tombstone) { // Note: the lock may be held at this point, but is recursive. scoped_lock locker(functions_lock); function_map_t::iterator iter = loaded_functions.find(name); // Not found. Not erasing. if (iter == loaded_functions.end()) return false; // Removing an auto-loaded function. Prevent it from being auto-reloaded. if (iter->second.is_autoload && tombstone) function_tombstones.insert(name); loaded_functions.erase(iter); event_t ev(EVENT_ANY); ev.function_name = name; event_remove(ev); return true; }