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

Re: 5.8.2 coredump: tied hashes implemented as XSUB methods

Thread Previous | Thread Next
Nick Ing-Simmons
November 19, 2003 03:17
Re: 5.8.2 coredump: tied hashes implemented as XSUB methods
Message ID:
Alan Burlison <> writes:
>Yitzchak Scott-Thoennes wrote:
>> My memory is that they used the READONLY flag on the hashes to
>> indicate a restricted hash only after checking that it had no current
>> meaning.  If that memory is correct, setting it on the HVs in 5.6.1
>> was a noop.  Did you find that it had any effect?
>I think it had an effect if you applied it to the hash elements, but I don't 
>think it ever did anything to the hash itself.  From looking through the 
>Hash::Utils documentation, I think I probably *do* want to use restricted 
>hashes, as I'm representing a tree of read-only C structs as a tree of 
>hashes, which is why I was fiddling around with SvREADONLY_on in the first 
>place.  However, I'm not aware of any documentation on how this should be 
>done from XSUB code.  I can always look at how Hash::Utils does it, but 
>that's implemented (mainly) in perl rather than XSUB - I was hoping for some 
>existing XSUB code I could plagarise ;-)

As far as I know:

Create your HV
Add all the "members" using normal calls.
Forget about it.

>Alan Burlison

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About