Is there a way to cast bytes
to a type defined by a PyBind11
module?
#3564
Unanswered
CraigHutchinson
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my first Python code I have a case where I have the underlying
bytearray
for a C-Struct, I already know that these bytes define a type in my PyBind11 module.It feels like this should be simple means to cast the bytes to my type as to not require a round-trip to the C module? I would naively assume that the PyBind11 types must contain/reference an internal byte array somehow and I just need to be setting this from python somehow.
Beta Was this translation helpful? Give feedback.
All reactions