X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=xsh%2Futil.h;fp=xsh%2Futil.h;h=500472364a3545615e9b38ecd5781d318a1ce177;hp=dcc142c79066a5d532afbe31691d5cfc41d82279;hb=b2f0fe94a79e6c4426f2b566bd06e5acf9f42c02;hpb=7b9a8ae944bb32360e3a8807ec6cb05376fd4183 diff --git a/xsh/util.h b/xsh/util.h index dcc142c..5004723 100644 --- a/xsh/util.h +++ b/xsh/util.h @@ -13,7 +13,12 @@ # if XSH_HAS_PERL(5, 8, 9) || XSH_HAS_PERL(5, 9, 3) # define XSH_ASSERT(C) assert(C) # else -# define XSH_ASSERT(C) PERL_DEB( \ +# ifdef PERL_DEB +# define XSH_DEB(X) PERL_DEB(X) +# else +# define XSH_DEB(X) (X) +# endif +# define XSH_ASSERT(C) XSH_DEB( \ ((C) ? ((void) 0) \ : (Perl_croak_nocontext("Assertion %s failed: file \"" __FILE__ \ "\", line %d", STRINGIFY(C), __LINE__), \ @@ -23,13 +28,6 @@ # define XSH_ASSERT(C) #endif -#undef VOID2 -#ifdef __cplusplus -# define VOID2(T, P) static_cast(P) -#else -# define VOID2(T, P) (P) -#endif - #ifndef STMT_START # define STMT_START do #endif @@ -61,19 +59,6 @@ #define xsh_dup(S, P) sv_dup((S), (P)) #define xsh_dup_inc(S, P) SvREFCNT_inc(xsh_dup((S), (P))) -/* Context for PerlMemShared_*() functions */ -#ifdef PERL_IMPLICIT_SYS -# define pPMS pTHX -# define pPMS_ pTHX_ -# define aPMS aTHX -# define aPMS_ aTHX_ -#else -# define pPMS void -# define pPMS_ -# define aPMS -# define aPMS_ -#endif - #ifdef USE_ITHREADS # define XSH_LOCK(M) MUTEX_LOCK(M) # define XSH_UNLOCK(M) MUTEX_UNLOCK(M)