Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
peacalm committed Oct 21, 2024
1 parent 00d2b5a commit 00bf8eb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1985,7 +1985,17 @@ int main() {
auto d = std::make_shared<Bar>();
l.callf<void>("f", c, d);
assert(c->i == 2);
assert(a.i == 2);
assert(d->i == 100);
// Get the function
auto f = l.get<peacalm::luaw::function<
void(peacalm::luaw::ptrw<Foo>, std::shared_ptr<Bar>)>>("f");
f(c, d);
assert(!f.failed());
assert(c->i == 3);
assert(a.i == 3);
assert(d->i == 200);
}
```

Expand Down

0 comments on commit 00bf8eb

Please sign in to comment.