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? 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 -- Hugo Parente Lima INdT - Instituto Nokia de Tecnologia
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PySide mailing list [email protected] http://lists.pyside.org/listinfo/pyside
