The macro's can expand to other macro's that expand to other macro's ...:

perl-current $ ./perl -Ilib Porting/expand-macro.pl SvPVX `sh cflags "optimize='-O2 -g'" try.c` -E try.c > try.i CCCMD = ccache g++ -DPERL_CORE -c -D_REENTRANT -D_GNU_SOURC +E -fPIC -DDEBUGGING -DDEBUGGING -fno-strict-aliasing -pipe -fstack-pr +otector -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS= +64 -O2 -g -Wall -ansi -W -Wextra -Wendif-labels -Wwrite-strings -Wn +o-unused-variable -Wno-unused-parameter # 4 "SvPVX expands to" (*({ SV *const _svpvx = ((SV *)({ void *_p = (A0); _p; })); ((((svtype +)((_svpvx)->sv_flags & 0xff)) >= SVt_PV) ? static_cast<void> (0) : __ +assert_fail ("((svtype)((_svpvx)->sv_flags & 0xff)) >= SVt_PV", "SvPV +X expands to", 4, __PRETTY_FUNCTION__)); ((((svtype)((_svpvx)->sv_fla +gs & 0xff)) != SVt_PVAV) ? static_cast<void> (0) : __assert_fail ("(( +svtype)((_svpvx)->sv_flags & 0xff)) != SVt_PVAV", "SvPVX expands to", + 4, __PRETTY_FUNCTION__)); ((((svtype)((_svpvx)->sv_flags & 0xff)) != + SVt_PVHV) ? static_cast<void> (0) : __assert_fail ("((svtype)((_svpv +x)->sv_flags & 0xff)) != SVt_PVHV", "SvPVX expands to", 4, __PRETTY_F +UNCTION__)); ((!((((_svpvx)->sv_flags & (0x00004000|0x00008000)) == 0 +x00008000) && (((svtype)((_svpvx)->sv_flags & 0xff)) == SVt_PVGV || ( +(svtype)((_svpvx)->sv_flags & 0xff)) == SVt_PVLV))) ? static_cast<voi +d> (0) : __assert_fail ("!((((_svpvx)->sv_flags & (0x00004000|0x00008 +000)) == 0x00008000) && (((svtype)((_svpvx)->sv_flags & 0xff)) == SVt +_PVGV || ((svtype)((_svpvx)->sv_flags & 0xff)) == SVt_PVLV))", "SvPVX + expands to", 4, __PRETTY_FUNCTION__)); ((!(((svtype)((_svpvx)->sv_fl +ags & 0xff)) == SVt_PVIO && !(((XPVIO*) (_svpvx)->sv_any)->xio_flags +& 64))) ? static_cast<void> (0) : __assert_fail ("!(((svtype)((_svpvx +)->sv_flags & 0xff)) == SVt_PVIO && !(((XPVIO*) (_svpvx)->sv_any)->xi +o_flags & 64))", "SvPVX expands to", 4, __PRETTY_FUNCTION__)); &((_sv +pvx)->sv_u.svu_pv); }))

Sometimes that helps but sometimes it just obfuscates more then it explains


Enjoy, Have FUN! H.Merijn

In reply to Re^2: XS, pointer scope, strings, allocation responsibility, sv_setpv, SvPV, pack's pointer by Tux
in thread XS, pointer scope, strings, allocation responsibility, sv_setpv, SvPV, pack's pointer by patcat88

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.