stas 2003/07/29 02:28:19
Modified: xs/APR/PerlIO apr_perlio.c . Changes Log: fix APR::PerlIO layer to pop itself if open() has failed. remove the workaround that was needed before the proper solution was provided Revision Changes Path 1.28 +2 -11 modperl-2.0/xs/APR/PerlIO/apr_perlio.c Index: apr_perlio.c =================================================================== RCS file: /home/cvs/modperl-2.0/xs/APR/PerlIO/apr_perlio.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- apr_perlio.c 25 Jul 2003 12:49:40 -0000 1.27 +++ apr_perlio.c 29 Jul 2003 09:28:19 -0000 1.28 @@ -40,15 +40,6 @@ return code; } -static IV PerlIOAPR_popped(pTHX_ PerlIO *f) -{ - /* XXX: PL_perlio persists, and remembers old layers, which are - * inactive, but core perlio should reset it, provide a temp - * workaround */ - PL_perlio = NULL; - return PerlIOBase_popped(aTHX_ f); -} - static PerlIO *PerlIOAPR_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers, IV n, const char *mode, int fd, int imode, @@ -111,7 +102,7 @@ #endif if (rc != APR_SUCCESS) { - PerlIOBase(f)->flags |= PERLIO_F_ERROR; + PerlIO_pop(aTHX_ f); return NULL; } @@ -393,7 +384,7 @@ sizeof(PerlIOAPR), PERLIO_K_MULTIARG, PerlIOAPR_pushed, - PerlIOAPR_popped, + PerlIOBase_popped, PerlIOAPR_open, PerlIOBase_binmode, /* binmode() is handled by :crlf */ NULL, /* no getarg needed */ 1.200 +2 -0 modperl-2.0/Changes Index: Changes =================================================================== RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.199 retrieving revision 1.200 diff -u -r1.199 -r1.200 --- Changes 28 Jul 2003 17:32:33 -0000 1.199 +++ Changes 29 Jul 2003 09:28:19 -0000 1.200 @@ -12,6 +12,8 @@ =item 1.99_10-dev +fix APR::PerlIO layer to pop itself if open() has failed. [Stas] + move the definition of DEFINE='-DMP_HAVE_APR_LIBS' to the top level Makefile.PL, since it overrides MY::pasthru target which makes it impossible to define local DEFINE in subdirs. [Stas]