import PyInline __main__ PyInline build code double my_add double doub

1
2
3
4
5
6
7
8
import PyInline, __main__
m = PyInline.build(code="""
double my_add(double a, double b) {
return a + b;
}""",
targetmodule=__main__, language="C")
print my_add(4.5, 5.5) # Should print out "10.0"