in reply to Re^5: XS/Inline::C concat *any* two SVs.
in thread XS/Inline::C concat *any* two SVs.
Once again thankyou. That does greatly simplify the code and produce the desired results:
SV* test( SV *a, SV *b ) { if( SvREADONLY( a ) ) a = newSVpv( SvPVX( a ), 0 ); else SvREFCNT_inc( a ); if( !SvOK( a ) ) sv_setpvn( a, "", 0 ); sv_catsv( a, b ); return a; } ... __END__ c:\test>test billfred fred billfred 1fred 1fred1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: XS/Inline::C concat *any* two SVs. (!all)
by tye (Sage) on May 30, 2006 at 18:15 UTC | |
by BrowserUk (Patriarch) on May 30, 2006 at 18:27 UTC | |
by creamygoodness (Curate) on May 31, 2006 at 05:59 UTC | |
by tye (Sage) on May 31, 2006 at 14:59 UTC | |
by creamygoodness (Curate) on May 31, 2006 at 18:59 UTC |