From ca8337a41da773fc02216724ff0b3d01a37938fa Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Fri, 3 Jul 2009 05:47:53 +0000 Subject: [PATCH] Fix clone of functions --- dispatchkit/bootstrap.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dispatchkit/bootstrap.hpp b/dispatchkit/bootstrap.hpp index 28cea4ac..2b4240ef 100644 --- a/dispatchkit/bootstrap.hpp +++ b/dispatchkit/bootstrap.hpp @@ -467,6 +467,11 @@ namespace dispatchkit return Boxed_Value(f->types_match(std::vector(params.begin() + 1, params.end()))); } + static boost::shared_ptr function_clone(boost::shared_ptr f) + { + return f; + } + static void bootstrap(Dispatch_Engine &s) { s.register_type("void"); @@ -495,7 +500,6 @@ namespace dispatchkit add_oper_add(s); add_oper_add_equals (s); add_opers_comparison(s); - s.register_function(build_constructor, const boost::shared_ptr &>(), "clone"); register_function(s, &print, "print_string"); register_function(s, &println, "println_string"); @@ -508,6 +512,8 @@ namespace dispatchkit s.register_function(boost::shared_ptr(new Dynamic_Proxy_Function(boost::bind(&bind_function, _1))), "bind"); + register_function(s, &function_clone, "clone"); + s.register_function(boost::shared_ptr(new Dynamic_Proxy_Function(boost::bind(&call_exists, _1))), "call_exists");