in reply to Re^2: XS/Inline::C concat *any* two SVs.
in thread XS/Inline::C concat *any* two SVs.
I don't know how to avoid the "uninitialized value in subroutine entry" warning (apart from the obvious). Predicting whether you're going to get it or not is a little tricky. Of the 2 following subs, only test5() produces the warning for me:SV* test( SV *a, SV *b ) { SV * c; if(SvREADONLY(a)) { c = newSVsv(a); sv_catsv(c, b); return c; } sv_catsv(a,b); c = newSVsv(a); return c; }
And if I comment out the sv_catsv() call in the code that vkon posted, then the warning disappears. Obviously the exact nature of what the xsub does has a bearing on whether we get that warning.SV * test4(SV * a, SV * b){return newSVuv(42);} SV * test5(char * a, char * b){return newSVuv(42);}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: XS/Inline::C concat *any* two SVs.
by BrowserUk (Patriarch) on May 28, 2006 at 14:15 UTC | |
by creamygoodness (Curate) on May 28, 2006 at 14:44 UTC | |
by BrowserUk (Patriarch) on May 28, 2006 at 15:20 UTC | |
by BrowserUk (Patriarch) on May 28, 2006 at 15:22 UTC | |
by creamygoodness (Curate) on May 28, 2006 at 15:30 UTC | |
by BrowserUk (Patriarch) on May 28, 2006 at 15:41 UTC | |
|