> That is going to try and copy nOutDataLen bytes starting at wherever
> C compiler has allocated the "" constant string.
>
> I think you want:
>
>    /* make it a string - calling sv_upgrade() would be slightly more
efficent */
>    sv_setpvn(svOutData, "", 0);
>
>    /* Grow buffer and get the pointer to the buffer */
>    pOutData = (unsigned char*) SvGROW(svOutData, nOutDataLen+1);
>    /* tell perl number of valid bytes */
>    SvCUR_set(svOutData, nOutDataLen);

That's it. The usual how could I miss that effect now. :-)

Thanks,

Zoltan

Reply via email to