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

Re: PERL_NO_GET_CONTEXT (Was: [PATCH] shift; optimization)

Thread Previous | Thread Next
From:
Ben Morrow
Date:
May 7, 2010 15:41
Subject:
Re: PERL_NO_GET_CONTEXT (Was: [PATCH] shift; optimization)
Message ID:
20100507224126.GA71288@osiris.mauzo.dyndns.org
Quoth jand@activestate.com ("Jan Dubois"):
> On Mon, 03 May 2010, Steffen Mueller wrote:
> > I agree that the Perl docs are big and not always well laid out, but is
> > perl*guts* the place to document something that an XS author should
> > certainly remember? OTOH, it's discussed to great lengths in perlguts,
> > so if we assume that an XS author has at least skimmed the document as
> > he should, he won't completely oblivious to it.
> 
> I can't think of any excuse why an XS author should not have read perlguts.pod
> multiple times. :)

+1 :)

> > Also, is this a default that we might be able to change down the road?
> 
> It is possible, but it will break XS extensions that have not
> prepared for this.

A general solution to this problem would be to put something like

    #if PERL_WANT_VERSION > 5013000
    #  define PERL_NO_GET_CONTEXT
    #endif

in perl.h. This would still require action on the part of XS authors for
the practice to spread, but it would give us an easily-understood way to
change the C API without breaking old modules.

Ben


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