X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=XSUB.h;h=15f2b411f070254c9700a564b01ca30713585928;hb=24e11b2ac803c2241e1c997535309a8b2ce19d1d;hp=c43b7f9645357e8e174b1e4c919a5ae892716be7;hpb=51371543ca1a75ed152020ad0846b5b8cf11c32f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/XSUB.h b/XSUB.h index c43b7f9..15f2b41 100644 --- a/XSUB.h +++ b/XSUB.h @@ -110,23 +110,22 @@ # define VTBL_amagicelem &PL_vtbl_amagicelem #endif -#ifdef PERL_OBJECT - +#if defined(PERL_OBJECT) || defined(PERL_CAPI) # include "perlapi.h" # include "objXSUB.h" +#endif /* PERL_OBJECT || PERL_CAPI */ -# undef aTHXo -# define aTHXo pPerl -# undef aTHXo_ -# define aTHXo_ aTHXo, -# undef _aTHXo -# define _aTHXo ,aTHXo - -# ifdef WIN32 -# undef fprintf -# define fprintf pPerl->fprintf -# endif /* WIN32 */ - +#if defined(PERL_CAPI) +# undef aTHX +# undef aTHX_ +# undef _aTHX +# if defined(PERL_NO_GET_CONTEXT) +# define aTHX my_perl +# else +# define aTHX PERL_GET_INTERP +# endif /* PERL_NO_GET_CONTEXT */ +# define aTHX_ aTHX, +# define _aTHX ,aTHX # ifndef NO_XSLOCKS # undef closedir # undef opendir @@ -278,9 +277,5 @@ # define shutdown PerlSock_shutdown # define socket PerlSock_socket # define socketpair PerlSock_socketpair -# ifdef WIN32 -# include "XSlock.h" -# endif # endif /* NO_XSLOCKS */ - -#endif /* PERL_OBJECT */ +#endif /* PERL_CAPI */