Subject: Re: ext/ + -Wall
Message-Id: <
200106120634.f5C6YVM07246@smtp3.ActiveState.com>
p4raw-id: //depot/perl@10535
IV
PerlIOScalar_close(PerlIO *f)
{
+ dTHXs;
IV code = PerlIOBase_close(f);
PerlIOBase(f)->flags &= ~(PERLIO_F_RDBUF|PERLIO_F_WRBUF);
return code;
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD)
{
- dTHX;
+ dTHXs;
PerlIOVia *s = PerlIOSelf(f,PerlIOVia);
if (s->var)
{
PerlIOVia *s = PerlIOSelf(f,PerlIOVia);
if (s->var)
{
+ dTHXs;
STDCHAR *p = (STDCHAR *)(SvEND(s->var) - s->cnt);
return p;
}
int
Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
{
+ dTHXs;
va_list(arglist);
va_start(arglist, format);
return PerlIO_vprintf(stream, format, arglist);
int
Perl_printf_nocontext(const char *format, ...)
{
+ dTHXs;
va_list(arglist);
va_start(arglist, format);
return PerlIO_vprintf(PerlIO_stdout(), format, arglist);
# 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