假设我有来自 main 的 float x
import progC
def main():
x = 3
y=progC(x)
print y
if __name__ == __main__
main()
#include <Python.h>
static PyObject* py_bracket(PyObject* self, float x){
x = x+5;
return Py_BuildValue("d",x);
}
好的问题是我的 C 程序中的 float x 从 python 接收 0 而不是数字 3