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

Re: perl's internal usage of dTHX; is a bad idea

Thread Previous | Thread Next
From:
Stas Bekman
Date:
October 25, 2003 17:27
Subject:
Re: perl's internal usage of dTHX; is a bad idea
Message ID:
3F9B1545.3020807@stason.org
Nick Ing-Simmons wrote:
> Stas Bekman <stas@stason.org> writes:
> 
>>Frankly I don't understand why internally Perl uses functions which aren't 
>>prototyped with (pTHX_ ...), and call dTHX; instead. 
> 
> 
> XS module API compatibility.

Yes, but I'm talking about internal calls (not XS) that have my_perl, but not 
passing it because the callee doesn't accept one (Perl_safesysmalloc is one of 
those).

If all internall perl calls were never to use dTHX, PERL_SET_CONTEXT() won't 
be needed.

> Most of API _does_ pass aTHX (usually via a macro).
> An up-to-date list of those that don't would be welcome, there 
> may now be few enough to replicate those and lead XS writers in 
> that direction.

Anybody has an idea of doing this programmatically? Using a simple C code 
parser that returns all functions that call dTHX and its variants?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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