WCValHashTable<void*>* m_allocList;
m_allocList = new WCValHashTable<void*> (fnAllocListHash, 256);
fnInsertHashListAddrs(m_allocList, FALSE);
-
my_perl = perl_alloc_using(&perlMem,
- NULL,
+ &perlMem,
NULL,
&perlEnv,
&perlStdIO,
lpProc=&perlProc;
else
lpProc=*ppProc;
-
my_perl = perl_alloc_using(lpMem,
- NULL,
+ lpMem,
NULL,
lpEnv,
lpStdio,
# define CopFILE(c) ((c)->cop_file)
# define CopFILEGV(c) (CopFILE(c) \
? gv_fetchfile(CopFILE(c)) : Nullgv)
-# define CopFILE_set(c,pv) ((c)->cop_file = savesharedpv(pv))
+
+ #ifdef NETWARE
+ #define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv))
+ #else
+ #define CopFILE_set(c,pv) ((c)->cop_file = savesharedpv(pv))
+ #endif
+
# define CopFILESV(c) (CopFILE(c) \
? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv)
# define CopFILEAV(c) (CopFILE(c) \
? GvAV(gv_fetchfile(CopFILE(c))) : Nullav)
# define CopSTASHPV(c) ((c)->cop_stashpv)
-# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = savesharedpv(pv))
+
+ #ifdef NETWARE
+ #define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
+ #else
+ #define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = savesharedpv(pv))
+ #endif
+
# define CopSTASH(c) (CopSTASHPV(c) \
? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch)
&& (CopSTASHPV(c) == HvNAME(hv) \
|| (CopSTASHPV(c) && HvNAME(hv) \
&& strEQ(CopSTASHPV(c), HvNAME(hv)))))
-# define CopSTASH_free(c) PerlMemShared_free(CopSTASHPV(c))
-# define CopFILE_free(c) (PerlMemShared_free(CopFILE(c)),(CopFILE(c) = Nullch))
+ #ifdef NETWARE
+ #define CopSTASH_free(c) SAVECOPSTASH_FREE(c)
+ #else
+ #define CopSTASH_free(c) PerlMemShared_free(CopSTASHPV(c))
+ #endif
+
+ #ifdef NETWARE
+ #define CopFILE_free(c) SAVECOPFILE_FREE(c)
+ #else
+ #define CopFILE_free(c) (PerlMemShared_free(CopFILE(c)),(CopFILE(c) = Nullch))
+ #endif
#else
# define CopFILEGV(c) ((c)->cop_filegv)
# define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv))
(*PL_Mem->pIsLocked)(PL_Mem)
/* Shared memory macros */
+#ifdef NETWARE
+
+ #define PerlMemShared_malloc(size) \
+ (*PL_Mem->pMalloc)(PL_Mem, (size))
+#define PerlMemShared_realloc(buf, size) \
+ (*PL_Mem->pRealloc)(PL_Mem, (buf), (size))
+#define PerlMemShared_free(buf) \
+ (*PL_Mem->pFree)(PL_Mem, (buf))
+#define PerlMemShared_calloc(num, size) \
+ (*PL_Mem->pCalloc)(PL_Mem, (num), (size))
+#define PerlMemShared_get_lock() \
+ (*PL_Mem->pGetLock)(PL_Mem)
+#define PerlMemShared_free_lock() \
+ (*PL_Mem->pFreeLock)(PL_Mem)
+#define PerlMemShared_is_locked() \
+ (*PL_Mem->pIsLocked)(PL_Mem)
+
+#else
+
#define PerlMemShared_malloc(size) \
(*PL_MemShared->pMalloc)(PL_MemShared, (size))
#define PerlMemShared_realloc(buf, size) \
#define PerlMemShared_is_locked() \
(*PL_MemShared->pIsLocked)(PL_MemShared)
+#endif
/* Parse tree memory macros */
#define PerlMemParse_malloc(size) \
*/
sz = (sz + 2*sizeof(I32 *) -1)/sizeof(I32 *);
if ((PL_OpSpace -= sz) < 0) {
- PL_OpPtr = (I32 **) PerlMemShared_malloc(PERL_SLAB_SIZE*sizeof(I32*));
- if (!PL_OpPtr) {
+ PL_OpPtr = (I32 **) PerlMemShared_malloc(PERL_SLAB_SIZE*sizeof(I32*));
+ if (!PL_OpPtr) {
return NULL;
}
Zero(PL_OpPtr,PERL_SLAB_SIZE,I32 **);
assert( ptr < ( (I32 **) slab + PERL_SLAB_SIZE) );
assert( *slab > 0 );
if (--(*slab) == 0) {
- PerlMemShared_free(slab);
+ #ifdef NETWARE
+ #define PerlMemShared PerlMem
+ #endif
+
+ PerlMemShared_free(slab);
if (slab == PL_OpSlab) {
PL_OpSpace = 0;
}