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

Re: [perl #123475] Bleadperl v5.21.6-51-ge41e986 breaks BDB

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
May 5, 2015 15:33
Subject:
Re: [perl #123475] Bleadperl v5.21.6-51-ge41e986 breaks BDB
Message ID:
20150505153321.GS4035@iabyn.com
On Mon, Apr 27, 2015 at 03:15:34PM -0700, Ricardo SIGNES via RT wrote:
> I can't easily compile BDB here.  Is the fix as simple as changing the
> PROTOTYPE entry for set_sync_prepare in BDB.xs to ";&" ?

Not really. It would also have to change the XS implementation to handle
a variable number of args, and still wouldn't handle the case of an
explicit 'undef' arg.

Looking at the usage in BDB, I think an undef value should still be
allowed as an argument to a '&' parameter.

BDB.pm does this as part of its initialisation:

    set_sync_prepare (undef);

where set_sync_prepare() is used to register a callback. So in this case
it is explicitly initialising its state to "no callback registered". I
think this is a reasonable use of the & prototype.

Looking at the original '&' ticket,

    #123062: & prototype is too permissive

I think it's correct that it should dis-allow array refs etc, but I think
undef should be re-allowed for 5.22.



-- 
Dave's first rule of Opera:
If something needs saying, say it: don't warble it.

Thread Previous | 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