Callback from Python to C++ with stl container #3631
Unanswered
joakim-hove
asked this question in
Q&A
Replies: 1 comment
-
Hmmm - seems that if I make a symbol def run(arg1, callback):
print(f"Running python - arg={arg1}")
args = ["ARG1", "arg2", "..."]
callback("Calling callback", args) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello;
this is a simplified version of the code I have. The system as a whole is a C++ application, which has a plugin system with Python, and the plugins can call back into C++ functionality:
The module "my_embedded" looks like:
The python plugin looks like:
when I run this I get a segmentation fault and the gdb backtrace looks like:
The problem seems to with the
std::vector<std::string>
argument - if I replace that with a scalar argument as for instance another string or an integer this works as desired.Beta Was this translation helpful? Give feedback.
All reactions