Fix one more documentation error

This commit is contained in:
Jason Turner 2011-06-10 16:42:38 -06:00
parent 8cc3651c76
commit 9e9fb3ad7d

View File

@ -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<double>("function(3, 4.75);");
}