Put back the cygwin32 Configure fix of 3582 undone by 3597.
[p5sagit/p5-mst-13.2.git] / XSUB.h
diff --git a/XSUB.h b/XSUB.h
index 74e8f02..70e7d84 100644 (file)
--- a/XSUB.h
+++ b/XSUB.h
@@ -1,13 +1,9 @@
 #define ST(off) PL_stack_base[ax + (off)]
 
-#ifdef PERL_OBJECT
-#  define XS(name) void name(CV* cv, CPerlObj* pPerl)
+#if defined(CYGWIN32) && defined(USE_DYNAMIC_LOADING)
+#  define XS(name) __declspec(dllexport) void name(pTHXo_ CV* cv)
 #else
-#  if defined(CYGWIN32) && defined(USE_DYNAMIC_LOADING)
-#    define XS(name) __declspec(dllexport) void name(pTHX_ CV* cv)
-#  else
-#    define XS(name) void name(pTHX_ CV* cv)
-#  endif
+#  define XS(name) void name(pTHXo_ CV* cv)
 #endif
 
 #define dXSARGS                                \
 #ifdef PERL_OBJECT
 #  include "objXSUB.h"
 
-#  undef  PERL_OBJECT_THIS
-#  define PERL_OBJECT_THIS pPerl
-#  undef  PERL_OBJECT_THIS_
-#  define PERL_OBJECT_THIS_ pPerl,
+#  undef  aTHXo
+#  define aTHXo                        pPerl
+#  undef  aTHXo_
+#  define aTHXo_               aTHXo,
+#  undef  _aTHXo
+#  define _aTHXo               ,aTHXo
 
 #  undef  SAVEDESTRUCTOR
 #  define SAVEDESTRUCTOR(f,p) \
 #      undef   errno
 #      define  errno                   ErrorNo()
 #    endif
-#    undef  ErrorNo
-#    define ErrorNo                    pPerl->ErrorNo
 #    undef  NtCrypt
 #    define NtCrypt                    pPerl->NtCrypt
 #    undef  NtGetLib
 #    define NtGetBin                   pPerl->NtGetBin
 #    undef  NtGetDebugScriptStr
 #    define NtGetDebugScriptStr                pPerl->NtGetDebugScriptStr
+#    undef fprintf
+#    define fprintf                    pPerl->fprintf
 #  endif /* WIN32 */
 
 #  ifndef NO_XSLOCKS