You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for Reassembler::getEvent and Reassembler::recvEvent is not natural, especially using Python List as the data buffer and then decode List[0] only.
I used Python List because at that moment, List is the only native Python object I could think of which is mutable and match the underlying C++ ** interface.
He recommended to look into Python ctypes package that we could pass variables by reference in Python. It can also reduce the data copies between Python and C++. That's definitely worth looking into.
The text was updated successfully, but these errors were encountered:
cissieAB
changed the title
Explore ctypes for python bindings for more natural bindings and reduce memory copy between Python and C++
Explore ctypes for python bindings
Nov 6, 2024
https://docs.python.org/3/library/ctypes.html#passing-pointers-or-passing-parameters-by-reference
Yatish mentioned current Python binding
Reassembler.getEvent/recvEvent(recv_buf: List) -> Tuple[int, int, int, int]
for
Reassembler::getEvent
andReassembler::recvEvent
is not natural, especially using Python List as the data buffer and then decode List[0] only.I used Python List because at that moment, List is the only native Python object I could think of which is mutable and match the underlying C++
**
interface.He recommended to look into Python
ctypes
package that we could pass variables by reference in Python. It can also reduce the data copies between Python and C++. That's definitely worth looking into.The text was updated successfully, but these errors were encountered: