develooper Front page | perl.perl5.porters | Postings from May 2004

[PATCH] Fix generation of perlapi.pod

Thread Next
Steve Hay
May 28, 2004 09:33
[PATCH] Fix generation of perlapi.pod
Message ID:
Not for the first time I've spent too long trying to figure out why an 
XSUB using NEWSV() was crashing.  I boiled it down to this:

        SV *sv = NEWSV(0, 1);

before realising that Safefree() is for use with New()/Newc()/Newz(), 
not NEWSV().  (That is correct isn't it?  I believe I need to mark the 
SV as mortal or use SvREFCNT_dec() to get it freed for me instead.)

I've done that before, and I think the reason is that NEWSV() is 
documented alongside New() et al, rather than with newSV() et al, which 
would be more appropriate.

Looking at it more closely, I see that the comments in handy.h used to 
generate potions of perlapi.pod clearly intended the NEWSV() docs to go 
into the "SV Manipulation Functions" section, but it erroneously ended 
up in the "Memory Management" section instead.

The reason is that the NEWSV() docs are immediately followed by a 
"=head1 Memory Management" line, and was getting confused 
which section it belonged in.

The attached patch fixes this bug in, which was also placing 
the following documentation in the wrong sections:


Clearly perlapi.pod needs regenerating afterwards.

- Steve

Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.

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