On Mon, 24 Nov 2008, Nicholas Clark wrote: > > If I counted correctly, there are 13 modules on CPAN which define PERL_CORE > when compiling their C (or XS) code. > > Seven of these are easy: > > Acme-NabeAtzz/NabeAtzz.xs:1:#define PERL_CORE > Acme-PerlVMGolf/PerlVMGolf.xs:1:#define PERL_CORE > Devel-Pragma/Pragma.xs:1:#define PERL_CORE > Goto-Cached/Cached.xs:1:#define PERL_CORE > autobox/autobox.xs:1:#define PERL_CORE > mysubs/mysubs.xs:1:#define PERL_CORE > > These all do nothing, and seem superfluous. I suspect that the author copied > this part of the XS code from somewhere else. If you go back to autobox-1.20 you see this at the very top of autobox.xs: | /* | context marshalling massively pessimizes extensions built for threaded perls e.g. Cygwin. | | define PERL_CORE rather than PERL_NO_GET_CONTEXT (see perlguts) because a) PERL_NO_GET_CONTEXT still incurs the | overhead of an extra function call for each interpreter variable; and b) this is a drop-in replacement for a | core op. | */ | | #define PERL_CORE So PERL_CORE has been defined explicitly to skip going through the compatibility API to avoid the performance penalty, with the "excuse" that this module should be part of core Perl and not a separate extension. Cheers, -JanThread Previous | Thread Next