Mingw32 PERL_OBJECT tweaks
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 0e8a8b7..e2b34bc 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -75,11 +75,11 @@ pointer to the PERL_OBJECT. This pointer type is CPerlObj*. This is
 made transparent to extension developers by the following macros:
        #define var pPerl->Perl_var
        #define func pPerl->Perl_func
-       * these are done in ObjXSub.h
+       * these are done in objXSUB.h
 This requires that the extension be compiled as C++, which means
 that the code must be ANSI C and not K&R C. For K&R extensions,
 please see the C API notes located in Win32/GenCAPI.pl. This script
-creates a PerlCAPI.lib that provides a K & R compatible C interface
+creates a perlCAPI.lib that provides a K & R compatible C interface
 to the PERL_OBJECT.
 2. Local variables and functions cannot have the same name as perl's
 variables or functions since the macros will redefine these. Look for
@@ -111,9 +111,9 @@ class CPerlObj;
 #define PERL_OBJECT_THIS this
 #define _PERL_OBJECT_THIS ,this
 #define PERL_OBJECT_THIS_ this,
-#define CALLRUNOPS (this->*runops)
-#define CALLREGCOMP (this->*regcompp)
-#define CALLREGEXEC (this->*regexecp)
+#define CALLRUNOPS (this->*PL_runops)
+#define CALLREGCOMP (this->*PL_regcompp)
+#define CALLREGEXEC (this->*PL_regexecp)
 
 #else /* !PERL_OBJECT */
 
@@ -1153,20 +1153,20 @@ typedef pthread_key_t perl_key;
 
   
 #ifdef VMS
-#   define STATUS_NATIVE       statusvalue_vms
+#   define STATUS_NATIVE       PL_statusvalue_vms
 #   define STATUS_NATIVE_EXPORT \
-       ((I32)statusvalue_vms == -1 ? 44 : statusvalue_vms)
+       ((I32)PL_statusvalue_vms == -1 ? 44 : PL_statusvalue_vms)
 #   define STATUS_NATIVE_SET(n)                                                \
        STMT_START {                                                    \
-           statusvalue_vms = (n);                                      \
-           if ((I32)statusvalue_vms == -1)                             \
+           PL_statusvalue_vms = (n);                                   \
+           if ((I32)PL_statusvalue_vms == -1)                          \
                PL_statusvalue = -1;                                    \
-           else if (statusvalue_vms & STS$M_SUCCESS)                   \
+           else if (PL_statusvalue_vms & STS$M_SUCCESS)                \
                PL_statusvalue = 0;                                     \
-           else if ((statusvalue_vms & STS$M_SEVERITY) == 0)           \
-               PL_statusvalue = 1 << 8;                                        \
+           else if ((PL_statusvalue_vms & STS$M_SEVERITY) == 0)        \
+               PL_statusvalue = 1 << 8;                                \
            else                                                        \
-               PL_statusvalue = (statusvalue_vms & STS$M_SEVERITY) << 8;       \
+               PL_statusvalue = (PL_statusvalue_vms & STS$M_SEVERITY) << 8;    \
        } STMT_END
 #   define STATUS_POSIX        PL_statusvalue
 #   ifdef VMSISH_STATUS
@@ -1179,12 +1179,12 @@ typedef pthread_key_t perl_key;
            PL_statusvalue = (n);                               \
            if (PL_statusvalue != -1) {                 \
                PL_statusvalue &= 0xFFFF;                       \
-               statusvalue_vms = PL_statusvalue ? 44 : 1;      \
+               PL_statusvalue_vms = PL_statusvalue ? 44 : 1;   \
            }                                           \
-           else statusvalue_vms = -1;                  \
+           else PL_statusvalue_vms = -1;                       \
        } STMT_END
-#   define STATUS_ALL_SUCCESS  (PL_statusvalue = 0, statusvalue_vms = 1)
-#   define STATUS_ALL_FAILURE  (PL_statusvalue = 1, statusvalue_vms = 44)
+#   define STATUS_ALL_SUCCESS  (PL_statusvalue = 0, PL_statusvalue_vms = 1)
+#   define STATUS_ALL_FAILURE  (PL_statusvalue = 1, PL_statusvalue_vms = 44)
 #else
 #   define STATUS_NATIVE       STATUS_POSIX
 #   define STATUS_NATIVE_EXPORT        STATUS_POSIX
@@ -1568,13 +1568,13 @@ typedef Sighandler_t Sigsave_t;
 # define PAD_SV(po) pad_sv(po)
 # define RUNOPS_DEFAULT runops_debug
 #else
-# define PAD_SV(po) curpad[po]
+# define PAD_SV(po) PL_curpad[po]
 # define RUNOPS_DEFAULT runops_standard
 #endif
 
 #ifdef MYMALLOC
-#  define MALLOC_INIT MUTEX_INIT(&malloc_mutex)
-#  define MALLOC_TERM MUTEX_DESTROY(&malloc_mutex)
+#  define MALLOC_INIT MUTEX_INIT(&PL_malloc_mutex)
+#  define MALLOC_TERM MUTEX_DESTROY(&PL_malloc_mutex)
 #else
 #  define MALLOC_INIT
 #  define MALLOC_TERM