Ah. I was reading code not documentation. :)
SV * Perl_newSV(pTHX_ const STRLEN len) { dVAR; register SV *sv; new_SV(sv); if (len) { sv_upgrade(sv, SVt_PV); SvGROW(sv, len + 1); } return sv; }
I believe I::C will take care of that for me.
Indeed. Inline::C-Cookbook makes that clear (though doesn't take the credit):
In this example the sv_2mortal call gets done under the hood by XS, because we declared the return type to be SV*.
Thanks.
- tye
In reply to Re^3: [I::C] Why does it segfault? (NDEBUG?)
by tye
in thread [I::C] Why does it segfault?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |