in reply to xs modifying passed value
Results after hacking up Bulk88's righteous work into my deeper needs!
Mucho Thanks for the kick in the git go.
int MyLib::strToInt(...) PREINIT: SV* passfailSV; bool passfail; CODE: if(items == 2) { SV* passfailSV = ST(1); RETVAL = THIS->strToInt(&passfail); SvSetMagicSV(passfailSV, passfail ? &PL_sv_yes : &PL_sv_no); } else if(items == 1) { RETVAL = THIS->strToInt(); } else croak("Usage: MyLib->strToInt(...)"); OUTPUT: RETVAL
Critiques ??
Comments ??
Suggestions ??
Improvements ??
-Enjoy
fh : )_~
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: xs modifying passed value
by bulk88 (Priest) on Nov 18, 2012 at 02:03 UTC | |
by bulk88 (Priest) on Nov 18, 2012 at 07:43 UTC |
In Section
Seekers of Perl Wisdom