On Sun, Jul 13, 2003 at 07:44:10PM -0500, Dave Rolsky wrote: > On Sun, 13 Jul 2003 [EMAIL PROTECTED] wrote: > > > It would be easy to change the Perl code generator into a C code > > generator. Then you could use DT::LeapSecond at compile time, if they > > are using XS, or at runtime, if they are using pure Perl. > > But the point is to avoid having to cross the Perl->C barrier. If DT::LS > were still a separate module, then calls from the DateTime XS to the > DT::LS XS barrier would probably have to go C->Perl->C, which would be > bad.
FYI the DBI does this: CV *xscv = GvCV(imp_msv); (void)(*CvXSUB(xscv))(aTHXo_ xscv); /* Call the C code directly */ to call a perl XS sub from XS. See the code for more details. (That shortcut is disabled for threaded perls but that dates from 5005 threads not iThreads and the restriction can probably be removed now.) Tim.
