in reply to Re^2: XS/Inline::C concat *any* two SVs.
in thread XS/Inline::C concat *any* two SVs.
But given "my version" behaves as it should be. Please explain why it is not.
You need concatenation SV subroutine - you get it. You receive 'undefined' warning when SV is indeed undefined, this warning could perfectly avoided, but chunk of code do what it is asked to.
Right now, all is behaving, even w/o refcnt mess.#! perl -slw use strict; use Inline C => << '__C__', NAME => 'test', CLEAN_AFTER_BUILD => 0; #include <stdio.h> SV* test( SV *a, SV *b ) { SV *c = newSVsv(a); sv_catsv(c,b); return c; } __C__ print test( 'bill', 'fred' ); my( $p, $q ) = ( 'fred' ); print test( $q, $p ); $q = 'bill'; print test( $q, $p ); $q = 1; print test( $q, $p ); $p = 1; print test( $q, $p );
BR,
Vadim.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: XS/Inline::C concat *any* two SVs.
by BrowserUk (Patriarch) on May 28, 2006 at 14:24 UTC | |
by vkon (Curate) on May 28, 2006 at 22:08 UTC | |
by BrowserUk (Patriarch) on May 29, 2006 at 04:29 UTC | |
by vkon (Curate) on May 29, 2006 at 18:49 UTC | |
by BrowserUk (Patriarch) on May 30, 2006 at 05:59 UTC |