From: Gurusamy Sarathy Date: Fri, 5 Jun 1998 18:18:44 +0000 (+0000) Subject: [win32] add AS patch#26 (rename THIS to PERL_OBJEC_THIS to avoid clash X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1d58305527a3ac3d82e30967f5b0fae28fee911d;p=p5sagit%2Fp5-mst-13.2.git [win32] add AS patch#26 (rename THIS to PERL_OBJEC_THIS to avoid clash with the xsubpp-generated symbol) p4raw-id: //depot/win32/perl@1075 --- diff --git a/ObjXSub.h b/ObjXSub.h index 93a0445..183e87a 100644 --- a/ObjXSub.h +++ b/ObjXSub.h @@ -2001,10 +2001,10 @@ #define socketpair PerlSock_socketpair #endif /* NO_XSLOCKS */ -#undef THIS -#define THIS pPerl -#undef THIS_ -#define THIS_ pPerl, +#undef PERL_OBJECT_THIS +#define PERL_OBJECT_THIS pPerl +#undef PERL_OBJECT_THIS_ +#define PERL_OBJECT_THIS_ pPerl, #undef SAVEDESTRUCTOR #define SAVEDESTRUCTOR(f,p) \ diff --git a/perl.c b/perl.c index 2006d90..a72264c 100644 --- a/perl.c +++ b/perl.c @@ -386,7 +386,7 @@ perl_destruct(register PerlInterpreter *sv_interp) /* call exit list functions */ while (exitlistlen-- > 0) - exitlist[exitlistlen].fn(THIS_ exitlist[exitlistlen].ptr); + exitlist[exitlistlen].fn(PERL_OBJECT_THIS_ exitlist[exitlistlen].ptr); Safefree(exitlist); @@ -944,7 +944,7 @@ print \" \\@INC:\\n @INC\\n\";"); boot_core_UNIVERSAL(); if (xsinit) - (*xsinit)(THIS); /* in case linked C routines want magical variables */ + (*xsinit)(PERL_OBJECT_THIS); /* in case linked C routines want magical variables */ #if defined(VMS) || defined(WIN32) || defined(DJGPP) init_os_extras(); #endif diff --git a/perl.h b/perl.h index 7d591a9..b1f0be0 100644 --- a/perl.h +++ b/perl.h @@ -108,9 +108,9 @@ class CPerlObj; #define CPERLarg CPerlObj *pPerl #define CPERLarg_ CPERLarg, #define _CPERLarg ,CPERLarg -#define THIS this -#define _THIS ,this -#define THIS_ this, +#define PERL_OBJECT_THIS this +#define _PERL_OBJECT_THIS ,this +#define PERL_OBJECT_THIS_ this, #define CALLRUNOPS (this->*runops) #else /* !PERL_OBJECT */ @@ -122,9 +122,9 @@ class CPerlObj; #define CPERLarg void #define CPERLarg_ #define _CPERLarg -#define THIS -#define _THIS -#define THIS_ +#define PERL_OBJECT_THIS +#define _PERL_OBJECT_THIS +#define PERL_OBJECT_THIS_ #define CALLRUNOPS runops #endif /* PERL_OBJECT */ diff --git a/pp_ctl.c b/pp_ctl.c index 805262f..444036e 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1773,7 +1773,7 @@ PP(pp_goto) } else { stack_sp--; /* There is no cv arg. */ - (void)(*CvXSUB(cv))(cv _THIS); + (void)(*CvXSUB(cv))(cv _PERL_OBJECT_THIS); } LEAVE; return pop_return(); diff --git a/pp_hot.c b/pp_hot.c index 72deac4..9fbd176 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -2105,7 +2105,7 @@ PP(pp_entersub) curcopdb = NULL; } /* Do we need to open block here? XXXX */ - (void)(*CvXSUB(cv))(cv _THIS); + (void)(*CvXSUB(cv))(cv _PERL_OBJECT_THIS); /* Enforce some sanity in scalar context. */ if (gimme == G_SCALAR && ++markix != stack_sp - stack_base ) { diff --git a/toke.c b/toke.c index e9e3f00..c035563 100644 --- a/toke.c +++ b/toke.c @@ -1347,7 +1347,7 @@ filter_read(int idx, SV *buf_sv, int maxlen) /* Call function. The function is expected to */ /* call "FILTER_READ(idx+1, buf_sv)" first. */ /* Return: <0:error, =0:eof, >0:not eof */ - return (*funcp)(THIS_ idx, buf_sv, maxlen); + return (*funcp)(PERL_OBJECT_THIS_ idx, buf_sv, maxlen); } STATIC char * diff --git a/win32/dl_win32.xs b/win32/dl_win32.xs index b9d4c14..d721731 100644 --- a/win32/dl_win32.xs +++ b/win32/dl_win32.xs @@ -38,7 +38,7 @@ calls. static void dl_private_init(CPERLarg) { - (void)dl_generic_private_init(THIS); + (void)dl_generic_private_init(PERL_OBJECT_THIS); } /* @@ -80,7 +80,7 @@ dl_static_linked(char *filename) MODULE = DynaLoader PACKAGE = DynaLoader BOOT: - (void)dl_private_init(THIS); + (void)dl_private_init(PERL_OBJECT_THIS); void * dl_load_file(filename,flags=0) @@ -96,7 +96,7 @@ dl_load_file(filename,flags=0) DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," libref=%x\n", RETVAL)); ST(0) = sv_newmortal() ; if (RETVAL == NULL) - SaveError(THIS_ "%d",GetLastError()) ; + SaveError(PERL_OBJECT_THIS_ "%d",GetLastError()) ; else sv_setiv( ST(0), (IV)RETVAL); @@ -112,7 +112,7 @@ dl_find_symbol(libhandle, symbolname) DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," symbolref = %x\n", RETVAL)); ST(0) = sv_newmortal() ; if (RETVAL == NULL) - SaveError(THIS_ "%d",GetLastError()) ; + SaveError(PERL_OBJECT_THIS_ "%d",GetLastError()) ; else sv_setiv( ST(0), (IV)RETVAL);