| 1 | /* File: example.i */ |
| 2 | %module example |
| 3 | |
| 4 | %{ |
| 5 | #define SWIG_FILE_WITH_INIT |
| 6 | #include "example.h" |
| 7 | %} |
| 8 | |
| 9 | /* |
| 10 | * Repeat the prototypes of wrapped functions here |
| 11 | * Namespaces are required, but don't seem to affect the generated Python |
| 12 | * extension. |
| 13 | */ |
| 14 | namespace fanos { |
| 15 | |
| 16 | int fact(int n); |
| 17 | int add(int x, int y); |
| 18 | void send(int fd, Str* s); |
| 19 | |
| 20 | } |