Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
now testing py.Context.Close()
  • Loading branch information
Drew O'Meara committed Feb 12, 2022
commit 9b3b8bed213193cf6b092c4fc77d0b84afee119a
3 changes: 3 additions & 0 deletions examples/embedding/mylib.module.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ func init() {
"GO_VERSION": py.String(fmt.Sprintf("%s on %s %s", runtime.Version(), runtime.GOOS, runtime.GOARCH)),
"MYLIB_VERS": py.String("Vacation 1.0 by Fletch F. Fletcher"),
},
OnContextClosed: func(instance *py.Module) {
fmt.Print("<<< host py.Context of py.Module instance closing >>>\n+++\n")
},
})
}

Expand Down
2 changes: 2 additions & 0 deletions examples/embedding/testdata/embedding_out_golden.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ Spring Break itinerary:

I bet Monaco will be the best!

<<< host py.Context of py.Module instance closing >>>
+++