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
printf("File-mode string execution exited with a failure\n");
42
40
return;
43
41
}
42
+
case'E':
43
+
if(!ctx.exec_str_file("def foo(a,b):\n print(a)\n return [a , b]\n\ndef bar(a,b):\n for x in a:\n print(x,b)\n\nprint('created functions `foo` and `bar`')\n")) {
44
+
std::optional<SObj> ret = ctx.exec_func<SObj>("foo", "baz", 7);
45
+
if(ret) {
46
+
printf("Call to python `foo('baz', 7)` returned SOobj <%x>\n", (ptraddr_t)*ret);
47
+
if(ctx.exec_func<void>("bar", *ret, "quux")) {
48
+
printf("Call to python `bar(foo('baz',7), 'quux')` succeeded.\n");
49
+
} else {
50
+
printf("Call to python `bar(foo('baz',7), 'quux')` failed.\n");
51
+
}
52
+
ctx.free_obj_handle(*ret);
53
+
continue;
54
+
} else {
55
+
printf("Call to python `foo('bar', 7)` failed.\n");
56
+
return;
57
+
}
58
+
} else {
59
+
printf("File-mode string execution exited with a failure\n");
0 commit comments