Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
blueloveTH committed May 4, 2024
1 parent 94937f1 commit eaeec62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/05 Bind Simple Struct/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ int main(){
// Create a new module named "test"
PyObject* mod = vm->new_module("test");
// Register the Point class to the module
vm->register_user_class<Point>(mod, "Point", [](VM* vm, PyObject* mod, PyObject* type){
vm->register_user_class<Point>(mod, "Point",
[](VM* vm, PyObject* mod, PyObject* type){
vm->bind_field(type, "x", &Point::x);
vm->bind_field(type, "y", &Point::y);

Expand Down

0 comments on commit eaeec62

Please sign in to comment.