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


Thread Previous | Thread Next
Tim Bunce
November 19, 2003 04:07
Message ID:
On Tue, Nov 18, 2003 at 05:55:14PM -0800, Jan Dubois wrote:
> >Thank you for pointing this out, Jan. Though I thought you were talking about 
> >old XS modules that don't use PERL_NO_GET_CONTEXT.
> Yes, I am.  And if you do a quick grep on CPAN, you'll see plenty of
> modules that don't #define PERL_NO_GET_CONTEXT in their XS code, so this
> is always relevant if the embedding application doesn't have *complete*
> control over which modules are being used.

Perhaps they don't use PERL_NO_GET_CONTEXT because they don't know about it?

I don't recall hearing about it, but then I pay less attention to
p5p these days.  On the other hand, people shouldn't have to pay
attention to p5p, it should be clear from the relevant docs and
change notes.

But PERL_NO_GET_CONTEXT is hardly well advertised:

$ grep PERL_NO_GET_CONTEXT perl-5.8.2/pod/*
perl-5.8.2/pod/perlguts.pod:        #define PERL_NO_GET_CONTEXT     /* we want efficiency */
perl-5.8.2/pod/perlguts.pod:extension is the addition of a C<#define PERL_NO_GET_CONTEXT> before
perl-5.8.2/pod/perlguts.pod:        #define PERL_NO_GET_CONTEXT     /* we want efficiency */

Just three mentions, and in perlguts not perlxs. Nor any mentions
in perlxstut, nor perlapi, nor perlcall, nor any perl*delta etc etc.

And less than half of the extensions bundled with perl use it:

$ ls -l perl-5.8.2/ext/*/*.xs | wc -l
$ grep -l PERL_NO_GET_CONTEXT perl-5.8.2/ext/*/*.xs | wc -l

If (if!) PERL_NO_GET_CONTEXT would make a significant difference to
the reliability/performance of mod_perl 2 and other projects using
multiplicity then we need to consider ways of making it more widely used.

I might even be in favor of making it the default for perl5.9+
(along with some xsubpp tweaks to make it easy to disable for people
building extensions that would otherwise break due to lack of dTHX's.)


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