The struct is self referential.

The primary purpose of the tag name on structs is to allow for self referential definitions.

This compiles clean with MSVC:

typedef struct pMG { XPVMG *sv_any; U32 sv_refcnt; union { U32 sv_flags; struct { unsigned long type : 8; unsigned long f_IOK : 1; unsigned long f_NOK : 1; unsigned long f_POK : 1; unsigned long f_ROK : 1; unsigned long p_IOK: 1; unsigned long p_NOK: 1; unsigned long p_POK : 1; unsigned long p_SCREAM_phv_CLONEABLE_phv_CLONEABLE_prv_PCS +_IMPORTED : 1; unsigned long s_PADSTALE_SVpad_STATE : 1; unsigned long s_PADTMP_SVpad_TYPED : 1; unsigned long s_PADMY_SVpad_OUR : 1; unsigned long s_TEMP : 1; unsigned long s_OBJECT : 1; unsigned long s_GMG : 1; unsigned long s_SMG : 1; unsigned long s_RMG : 1; unsigned long f_FAKE_SVphv_REHASH : 1; unsigned long f_OOK : 1; unsigned long f_BREAK: 1; unsigned long f_READONLY : 1; unsigned long f_AMAGIC : 1; unsigned long f_UTF8_SVphv_SHAREKEYS : 1; unsigned long pav_REAL_phv_LAZYDEL_pbm_VALID_repl_EVAL : 1 +; unsigned long f_IVisUV_pav_REIFY_phv_HASKFLAGS_pfm_COMPILE +D_pbm_TAIL_prv_WEAKREF : 1; } flagsraw; }; union { IV svu_iv; UV svu_uv; struct pMG *svu_rv; char *svu_pv; struct pMG **svu_array; HE **svu_hash; GP *svu_gp; } sv_u; };

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


In reply to Re^3: Looking at a SV in C by BrowserUk
in thread Looking at a SV in C by bulk88

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.