Open
Conversation
* fix GIL ordering in generated CGo wrappers: restore GIL before go2py converters, use add_checked_string_function for C.CString return paths, and fix off-by-one in cgo.go malloc call * remove skip for TestBindSimple & TestBindCgoPackage * update Go version matrix in CI matrix
f1592e9 to
f2a9ad1
Compare
Member
Author
|
Added the "help wanted" label here, to signal that I'd appreciate review from anyone in the community 🙂 Please if you have any thoughts, questions, concerns - I'd greatly appreciate your feedback! Also, I'm sorry for the spam, but I'm cc'ing recent contributors to invite feedback 🙏 cc/ @rcoreilly @kousu @coffeemakingtoaster @pswilde |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes and un-skips two tests that have been skipped since PR #384 .
Fixes: #385
Rrelates-to: #370
malloccallChanges
bind/gen_func.go: restore the GIL before callinggo2pyconverters — Python C API calls insidego2pymust run with the GIL held, not after it has been released for the Go callbind/gen_map.go,bind/gen_slice.go,bind/gen_struct.go: useadd_checked_string_functionfor functions whose return type usesC.CString, so pybindgen generates correct ownership / free logic_examples/cgo/cgo.go: fixmalloc(strlen(str))→malloc(strlen(str) + 1)(missing null terminator byte)main_test.go: removet.Skip()from TestBindSimple and TestBindCgoPackage.github/workflows/ci.yml: add Go 1.23.x to the test matrix