From 94e4b671f3859745f39bfdd9bb36a7cec32c67d0 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Sun, 30 Aug 2009 01:06:21 +0000 Subject: [PATCH] Make sure to invalidate the cache when a new function name is added --- include/chaiscript/dispatchkit/dispatchkit.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/chaiscript/dispatchkit/dispatchkit.hpp b/include/chaiscript/dispatchkit/dispatchkit.hpp index bc8497a..b0bc6ae 100644 --- a/include/chaiscript/dispatchkit/dispatchkit.hpp +++ b/include/chaiscript/dispatchkit/dispatchkit.hpp @@ -170,6 +170,7 @@ namespace chaiscript bool add(const Proxy_Function &f, const std::string &name) { validate_object_name(name); + m_scopes->first.erase(name); return add_function(f, name); }