It was Friday, November 14, 2003 when Stas Bekman took the soap box, saying: : Can someone with some spare time on they hands help us to introduce the new : APIs which accept pTHX_ instead of declaring dTHX, and deploy them in the : core, that would be a very noble conribution. : : After all it requires no understanding of perl guts, just browse through : perl/*[ch] files and: : : 1) find a function/macro that does dTHX declaration, : 2) use #define wrappers to create a new API which accepts pTHX_, as the : first argument, : 3) then find the places in the core where those functions are used and : replace with the new API that explicitly passes pTHX. : 4) Return to 1 untill no more functions using dTHX and having no parallel : API using pTHX_ are found. : : give a try to one function and post the patch here, so the gurus can : approve it and the rest should be just a mechanical work. In an attempt to be the monkey, I did what seemed correct. All tests passed, did I do something right (assuming the latter)? If not, I could use some more clues. Thanks. It appears, to me, that I didn't have to change any calls for Perl_deb(_nocontext)? because all of them are getting aTHX_ anyway. Casey West -- Shooting yourself in the foot with COBOL USEing a COLT 45 HANDGUN, AIM gun at LEG.FOOT, THEN place ARM.HAND.FINGER on HANDGUN.TRIGGER and SQUEEZE. THEN return HANDGUN to HOLSTER. CHECK whether shoelace needs to be retied. --- perl-current-orig/deb.c Wed Apr 16 14:25:36 2003 +++ perl-current/deb.c Sat Nov 15 15:04:36 2003 @@ -19,10 +19,9 @@ #if defined(PERL_IMPLICIT_CONTEXT) void -Perl_deb_nocontext(const char *pat, ...) +Perl_deb_nocontext(pTHX_ const char *pat, ...) { #ifdef DEBUGGING - dTHX; va_list args; va_start(args, pat); vdeb(pat, &args);Thread Previous | Thread Next