summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-06-10 23:34:19 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-06-10 23:34:19 +0000
commit41cd373618dfb8cfe39ec8169c4a1b162678c980 (patch)
treef80bc9dcfae919e521b468cdf15312e5aa2ef5bb /perl.h
parentb76802f5349f9b9be2e0dcf5948c4c7a2fa57d98 (diff)
downloadperl-41cd373618dfb8cfe39ec8169c4a1b162678c980.tar.gz
part of the platform changes for IMPLICIT_CONTEXT
p4raw-id: //depot/perl@3531
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h33
1 files changed, 16 insertions, 17 deletions
diff --git a/perl.h b/perl.h
index b4cbb11289..d8a035e500 100644
--- a/perl.h
+++ b/perl.h
@@ -1502,34 +1502,33 @@ typedef pthread_key_t perl_key;
#ifdef PERL_IMPLICIT_CONTEXT
# ifdef USE_THREADS
struct perl_thread;
-# define pTHX struct perl_thread *thr
-# define pTHX_ pTHX,
-# define _pTHX ,pTHX
-# define aTHX thr
-# define aTHX_ aTHX,
-# define _aTHX ,aTHX
-# define dTHX pTHX = (struct perl_thread *)SvPVX(PL_thrsv)
-# define dTHR dNOOP
+# define pTHX struct perl_thread *thr
+# define aTHX thr
+# define dTHXa(a) pTHX = (struct perl_thread *)a
+# define dTHX dTHXa(SvPVX(PL_thrsv))
+# define dTHR dNOOP
# else
# define MULTIPLICITY
-# define pTHX PerlInterpreter *my_perl
-# define pTHX_ pTHX,
-# define _pTHX ,pTHX
-# define aTHX my_perl
-# define aTHX_ aTHX,
-# define _aTHX ,aTHX
-# define dTHX pTHX = PL_curinterp
+# define pTHX PerlInterpreter *my_perl
+# define aTHX my_perl
+# define dTHXa(a) pTHX = (PerlInterpreter *)a
+# define dTHX dTHXa(PL_curinterp)
# endif
+# define pTHX_ pTHX,
+# define _pTHX ,pTHX
+# define aTHX_ aTHX,
+# define _aTHX ,aTHX
#endif
#ifndef pTHX
-# define pTHX void
+# define pTHX void
# define pTHX_
# define _pTHX
# define aTHX
# define aTHX_
# define _aTHX
-# define dTHX dNOOP
+# define dTHXa(a) dNOOP
+# define dTHX dNOOP
#endif
#define WITH_THX(s) STMT_START { dTHX; s; } STMT_END