[SciPy-user] weave: how to return values

Sebastian Haase haase at msg.ucsf.edu
Tue Aug 8 11:50:16 CDT 2006

I am surprised when reading this example in the documentation:
>>> a = 1
>>> a = weave.inline("return_val = Py::new_reference_to(Py::Int(a+1));",['a'])  
>>> a

is it really true that I can not just write !?
a = weave.inline("return_val = a+1;",['a'])  

I was under the impression that basic types were handled transparently;
how about:
a = weave.inline("char s[100] = "test"; return_val = s;") 

Sebastian Haase

More information about the SciPy-user mailing list