diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2001-06-11 16:34:31 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-12 13:27:28 +0000 |
commit | 1de7c2aca01d9e33d916dcec3cd53be0b1f8e101 (patch) | |
tree | 2efc0e17e307ec5906198016eadd03f2180fe518 | |
parent | c6c619a96fa11b09bef26d0c724b6cfd0bdbb34b (diff) | |
download | perl-1de7c2aca01d9e33d916dcec3cd53be0b1f8e101.tar.gz |
As suggested in
Subject: Re: ext/ + -Wall
Message-Id: <200106120634.f5C6YVM07246@smtp3.ActiveState.com>
p4raw-id: //depot/perl@10535
-rw-r--r-- | ext/PerlIO/Scalar/Scalar.xs | 1 | ||||
-rw-r--r-- | ext/PerlIO/Via/Via.xs | 3 | ||||
-rw-r--r-- | globals.c | 2 | ||||
-rw-r--r-- | perl.h | 9 |
4 files changed, 14 insertions, 1 deletions
diff --git a/ext/PerlIO/Scalar/Scalar.xs b/ext/PerlIO/Scalar/Scalar.xs index 9f991dd28c..49cb6e494a 100644 --- a/ext/PerlIO/Scalar/Scalar.xs +++ b/ext/PerlIO/Scalar/Scalar.xs @@ -65,6 +65,7 @@ PerlIOScalar_popped(PerlIO *f) IV PerlIOScalar_close(PerlIO *f) { + dTHXs; IV code = PerlIOBase_close(f); PerlIOBase(f)->flags &= ~(PERLIO_F_RDBUF|PERLIO_F_WRBUF); return code; diff --git a/ext/PerlIO/Via/Via.xs b/ext/PerlIO/Via/Via.xs index b2c93edf5c..605774b61b 100644 --- a/ext/PerlIO/Via/Via.xs +++ b/ext/PerlIO/Via/Via.xs @@ -391,7 +391,7 @@ PerlIOVia_get_base(PerlIO *f) { if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) { - dTHX; + dTHXs; PerlIOVia *s = PerlIOSelf(f,PerlIOVia); if (s->var) { @@ -409,6 +409,7 @@ PerlIOVia_get_ptr(PerlIO *f) PerlIOVia *s = PerlIOSelf(f,PerlIOVia); if (s->var) { + dTHXs; STDCHAR *p = (STDCHAR *)(SvEND(s->var) - s->cnt); return p; } @@ -73,6 +73,7 @@ CPerlObj::do_aspawn(void *vreally, void **vmark, void **vsp) int Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) { + dTHXs; va_list(arglist); va_start(arglist, format); return PerlIO_vprintf(stream, format, arglist); @@ -81,6 +82,7 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...) int Perl_printf_nocontext(const char *format, ...) { + dTHXs; va_list(arglist); va_start(arglist, format); return PerlIO_vprintf(PerlIO_stdout(), format, arglist); @@ -258,6 +258,15 @@ struct perl_thread; # define dTHXx dTHX #endif +/* Under PERL_IMPLICIT_SYS (used in Windows for fork emulation) + * PerlIO_foo() expands to PL_StdIO->pFOO(PL_StdIO, ...). + * dTHXs is therefore needed for all functions using PerlIO_foo(). */ +#ifdef PERL_IMPLICIT_SYS +# define dTHXs dTHX +#else +# define dTHXs dNOOP +#endif + #undef START_EXTERN_C #undef END_EXTERN_C #undef EXTERN_C |