develooper Front page | perl.perl5.porters | Postings from December 2012

a job for someone? SvREFCNT_dec_NN()

Thread Next
Dave Mitchell
December 4, 2012 12:04
a job for someone? SvREFCNT_dec_NN()
Message ID:
I've just added the SvREFCNT_dec_NN() macro, which can be used in
situations where we know the sv isn't null: so that the check can be

On gcc on x64_64 platforms, this makes each use of SvREFCNT_dec() 5 code
bytes shorter, and avoids a test and jump.

There are over 500 uses of SvREFCNT_dec() within the perl core; ideally
one or more volunteers could audit all those uses, and change them to the
_NN variant where its clear that the sv can't be null (e.g. because fields
within it have already been accessed, or it's an arg declared NN in

I don't want to achieve immortality through my work...
I want to achieve it through not dying.
    -- Woody Allen

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