in reply to SvMAGICAL() question

Given the case I'd guess it tests a flag in the SV structure. And given the name I'd guess that flag indicated that there is magic set on the SV. Maybe it's a quick check to avoid calling the various mg_* functions when they're not needed?

Of course, if you really want to know the best thing to do is to read the source. I'd start with sv.h since it's probably defined there. If you're lucky it'll come with a nice big comment.

-sam

Replies are listed 'Best First'.
Re^2: SvMAGICAL() question
by jettero (Monsignor) on Jul 13, 2005 at 17:42 UTC
    Oh, right you are. It's clearly:
    #define SvMAGICAL(sv) (SvFLAGS(sv) & (SVs_GMG|SVs_SMG|SVs_RMG))
    Now, if only I knew what those flags were. Oh, I see. What a wonderful file, thanks.
    #define SVs_GMG 0x00002000 /* has magical get method */ #define SVs_SMG 0x00004000 /* has magical set method */ #define SVs_RMG 0x00008000 /* has random magical methods */
    I'm still not clear on what they are, but I have some idea where to start.