From 9e9fb3ad7d6d840a7a9e905b2e50a8a84343f63a Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Fri, 10 Jun 2011 16:42:38 -0600 Subject: [PATCH] Fix one more documentation error --- readme.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index a7ed4913..a11e6618 100644 --- a/readme.txt +++ b/readme.txt @@ -25,7 +25,7 @@ Once instantiated, the engine is ready to start running ChaiScript source. You To make functions in your C++ code visible to scripts, they must be registered with the scripting engine. To do so, call add: -chai.add(&my_function, "my_function_name"); +chai.add(chaiscript::fun(&my_function), "my_function_name"); Once registered the function will be visible to scripts as "my_function_name" @@ -49,7 +49,7 @@ double function(int i, double j) int main() { chaiscript::ChaiScript chai; - chai.add(&function, "function"); + chai.add(chaiscript::fun(&function), "function"); double d = chai.eval("function(3, 4.75);"); }