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

create PyBuffer from rust code #190

Open
xd009642 opened this issue Nov 4, 2019 · 1 comment · May be fixed by #227
Open

create PyBuffer from rust code #190

xd009642 opened this issue Nov 4, 2019 · 1 comment · May be fixed by #227

Comments

@xd009642
Copy link

xd009642 commented Nov 4, 2019

So I've had experience before creating python bindings with the C++ library pybind11 where I'm able to return python buffers but I can't figure out how to do the same with rust-cpython

@gracinet
Copy link
Collaborator

@xd009642 sorry for the late reply, but you mean implementing Buffer Object Structures for Python Object defined with py_class!, right?

I don't see anything supporting that in rust-cpython. By contrast, cpython::PyBuffer provide methods for buffer consumption in the sense of the Buffer Protocol

I might be myself interested. If I understand correctly, implementing tp_as_buffer would be a good way to expose large array-like data structures to the Python interpreter.

@mloebel mloebel linked a pull request May 18, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants