develooper Front page | perl.perl5.porters | Postings from November 2011

Use of SvFAKE without SvREADONLY

Thread Next
From:
Father Chrysostomos
Date:
November 27, 2011 14:53
Subject:
Use of SvFAKE without SvREADONLY
Message ID:
AAB810B9-33CA-4386-AD16-AEB05B9AE329@cpan.org
#define SVf_FAKE	0x01000000  /* 0: glob or lexical is just a copy
				       1: SV head arena wasn't malloc()ed
				       2: in conjunction with SVf_READONLY
					  marks a shared hash key scalar
					  (SvLEN == 0) or a copy on write
					  string (SvLEN != 0) [SvIsCOW(sv)]
				       3: For PVCV, whether CvUNIQUE(cv)
					  refers to an eval or once only
					  [CvEVAL(cv), CvSPECIAL(cv)]
				       4: On a pad name SV, that slot in the
					  frame AV is a REFCNT'ed reference
					  to a lexical from "outside". */
#define SVphv_REHASH	SVf_FAKE    /* 5: On a PVHV, hash values are being
					  recalculated */

Item 0 above says ‘glob or lexical is just a copy’.  What type of lexical would that be?  Is it the same as item #4?  Are pad name SVs flagged somehow so they can be identified as such in isolation (e.g., in sv_setsv, etc.)?  Is it feasible to use SvFAKE without SvREADONLY to indicate that SvPVX is actually the key field of a HEK, but not a shared one?


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About