On Thu, 2011-10-13 at 10:53 -0300, Hugo Parente Lima wrote:
> On Thursday 13 October 2011 10:38:06 Xavier Serra wrote:
> > <object-type name="imm::CommunicationClient3DSP">
> > <modify-function
> > signature="getPeaks(std::vector<float>&,
> > std::vector<float>&)">
> > <modify-argument index="1">
> > <remove-argument/>
> > </modify-argument>
> > <modify-argument index="2">
> > <remove-argument/>
> > </modify-argument>
> > <modify-argument index='return'>
> > <replace-type modified-type='PyTuple' />
> > </modify-argument>
> > <inject-code class="target"
> > position="beginning">
> > float peaksIn[8];
> > float peaksOut[24];
> > %CPPSELF.%FUNCTION_NAME(peaksIn,
> > peaksOut);
> > </inject-code>
> > <inject-code class="target" position="end">
> > %PYARG_0 = PyTuple_New(2);
> > PyObject * inPeaks = PyTuple_New(8);
> > PyObject * outPeaks = PyTuple_New(24);
> > for(unsigned int i = 0; i < 8; i++)
> > {
> > PyTuple_SetItem(inPeaks, i,
> > Py_BuildValue("f", peaksIn[i]));
> > }
> > for(unsigned int i = 0; i < 24; i++)
> > {
> > PyTuple_SetItem(outPeaks, i,
> > Py_BuildValue("f", peaksOut[i]));
> > }
> > PyTuple_SetItem(%PYARG_0, 0, inPeaks);
> > PyTuple_SetItem(%PYARG_0, 1, outPeaks);
> > </inject-code>
> > </modify-function>
> > </object-type>
> >
> > Don't mind the inject code, it's outdated because the old version of
> > getPeaks was (float *, float *).
>
> Did you declare std::vector as a container-type in your typesystem?
That was the issue, adding <container-type name="std::vector"
type="vector"/> solved it.
Thanks!
>
> Regards.
>
> > Thanks
> >
> > On Thu, 2011-10-13 at 10:23 -0300, Marcelo Lira wrote:
> > > Xavier, can you send the type system lines related to getPeaks?
> >
> > _______________________________________________
> > PySide mailing list
> > [email protected]
> > http://lists.pyside.org/listinfo/pyside
>
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside