Skip to content

Commit 9047e62

Browse files
added "Pro Tipp" to callback example in readme.md
1 parent c5664ad commit 9047e62

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ teascript::ValueObject calc_square( teascript::Context &rContext )
119119
teascript::Engine engine;
120120

121121
// register a function as a callback. can use arbitrary names.
122+
// PRO TIPP: use a capturing lambda or std::bind to carry any user context with you.
122123
engine.RegisterUserCallback( "squared", calc_square );
123124

124125
// execute the script which will call our function

0 commit comments

Comments
 (0)