Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer protocol #10

Open
christian-korneck opened this issue May 30, 2022 · 5 comments
Open

buffer protocol #10

christian-korneck opened this issue May 30, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@christian-korneck
Copy link
Collaborator

I wonder if it would make sense to add the Python3 C-API functions related to the Python buffer protocol. This might make it easier to share bytes between Go and Python? (i.e. io.Reader/io.Writer stuff).

https://docs.python.org/3/c-api/buffer.html

@christian-korneck christian-korneck added the enhancement New feature or request label May 30, 2022
@aadog
Copy link

aadog commented Aug 12, 2022

@christian-korneck your dream is complete

Let's try it, python bindings cgo-less

https://github.com/aadog/py3-go

@christian-korneck
Copy link
Collaborator Author

@aadog do you have a buffer protocol example?

@aadog
Copy link

aadog commented Aug 16, 2022

What is he

@aadog
Copy link

aadog commented Aug 16, 2022

go to python or python to go,They are done automatically

string->str
intT ->intT

If it is not supported, please return * pyobject to convert manually, or modify pyconvert

https://github.com/aadog/py3-go/blob/master/PyConvert.go

@aadog
Copy link

aadog commented Aug 16, 2022

All this should be simple, but I don't know what type of byte should be converted to Python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants