Support for buffer protocol #215
Replies: 1 comment 2 replies
-
@kkrissian-gpfw Fantastic! PR adding this feature would certainly be welcome! I briefly looked at the change set and it looks good. One minor point: it would probably be best to move line G-P-S@d38ec90#diff-65d167d0534c5129832f0feba3c3dec474b681d136fbc4f37f7ce5ed523f0217R1185 to config.cpp so it in line with similar config functionality, like say: https://github.com/G-P-S/binder/blob/d38ec90f02beedee55d36aca13aba03ef4bfff52/source/config.cpp#L235 or other Also, if you up to it would probably be best to add simple test case for this functionality. If you would like to do so then please see https://github.com/RosettaCommons/binder/blob/master/test/T31.include_for_class.config for example of how to provide custom config file for test include files. Thank you and looking forward for PR! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have been using Binder to automatically bind several C++ libraries, and I have made some changes to the source code to adapt the tool to specific needs.
One of them was the support for pybind11 buffer_protocol as explained in https://pybind11.readthedocs.io/en/stable/advanced/pycpp/numpy.html with Binder.
We can consider two ways to use this feature with Binder:
I have made a simple example that uses the buffer_protocol with an addon, and made a few changes in the source code to support a new option +buffer_protocol classname.
The code is available in our forked repo in branch gp:
If you think this feature can be merged into master, I can create a Pull Request for it.
Thank you and best regards,
Karl Krissian
Beta Was this translation helpful? Give feedback.
All reactions