Commit a7db592
committed
Add proof of concept Python binding
Supports this code:
widget: @python type
= {
value: int;
operator=: (out this, i: int) = { value = i; }
add: (inout this, i: int) -> int
= { value += i; return value; }
shout: (this, s: std::string) -> std::string
= s + "!";
}
Being invoked from Python like this:
import widgetlib
w = widgetlib.widget(10)
print(w.add(5)) # prints 15
print(w.add(i=7)) # prints 22
print(w.shout("hello")) # prints "hello!"
I'm not checking in a test case though because this is proof-of-concept only, currently hardwired to generate pybind11 and bash .sh invoking g++-101 parent 53504bb commit a7db592
File tree
7 files changed
+1437
-1163
lines changed- regression-tests/test-results
- source
7 files changed
+1437
-1163
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6403 | 6403 | | |
6404 | 6404 | | |
6405 | 6405 | | |
| 6406 | + | |
| 6407 | + | |
| 6408 | + | |
6406 | 6409 | | |
6407 | 6410 | | |
6408 | 6411 | | |
| |||
6529 | 6532 | | |
6530 | 6533 | | |
6531 | 6534 | | |
6532 | | - | |
| 6535 | + | |
| 6536 | + | |
| 6537 | + | |
| 6538 | + | |
6533 | 6539 | | |
6534 | | - | |
6535 | | - | |
6536 | | - | |
| 6540 | + | |
| 6541 | + | |
| 6542 | + | |
| 6543 | + | |
| 6544 | + | |
| 6545 | + | |
6537 | 6546 | | |
6538 | 6547 | | |
6539 | 6548 | | |
6540 | 6549 | | |
6541 | 6550 | | |
| 6551 | + | |
| 6552 | + | |
6542 | 6553 | | |
6543 | 6554 | | |
6544 | 6555 | | |
6545 | 6556 | | |
| 6557 | + | |
| 6558 | + | |
| 6559 | + | |
| 6560 | + | |
| 6561 | + | |
| 6562 | + | |
| 6563 | + | |
| 6564 | + | |
| 6565 | + | |
| 6566 | + | |
6546 | 6567 | | |
6547 | 6568 | | |
6548 | 6569 | | |
| |||
0 commit comments