perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tors...@apache.org
Subject svn commit: r1242068 - in /perl/modperl/branches/threading/src/modules/perl: modperl_debug.h modperl_interp.c modperl_svptr_table.c
Date Wed, 08 Feb 2012 20:08:03 GMT
Author: torsten
Date: Wed Feb  8 20:08:03 2012
New Revision: 1242068

URL: http://svn.apache.org/viewvc?rev=1242068&view=rev
Log:
ap_assert => MP_ASSERT (depends on MP_DEBUG)

Modified:
    perl/modperl/branches/threading/src/modules/perl/modperl_debug.h
    perl/modperl/branches/threading/src/modules/perl/modperl_interp.c
    perl/modperl/branches/threading/src/modules/perl/modperl_svptr_table.c

Modified: perl/modperl/branches/threading/src/modules/perl/modperl_debug.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_debug.h?rev=1242068&r1=1242067&r2=1242068&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_debug.h (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_debug.h Wed Feb  8 20:08:03 2012
@@ -19,6 +19,12 @@
 
 #include "mod_perl.h"
 
+#ifdef MP_DEBUG
+#define MP_ASSERT(exp) ap_assert(exp)
+#else
+#define MP_ASSERT(exp) ((void)0)
+#endif
+
 char *modperl_server_desc(server_rec *s, apr_pool_t *p);
 
 #ifdef MP_TRACE

Modified: perl/modperl/branches/threading/src/modules/perl/modperl_interp.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_interp.c?rev=1242068&r1=1242067&r2=1242068&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_interp.c (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_interp.c Wed Feb  8 20:08:03
2012
@@ -285,7 +285,7 @@ apr_status_t modperl_interp_unselect(voi
 
     if (interp == mip->parent) return APR_SUCCESS;
 
-    ap_assert(interp && MpInterpIN_USE(interp));
+    MP_ASSERT(interp && MpInterpIN_USE(interp));
     MP_TRACE_i(MP_FUNC, "unselect(interp=0x%lx): refcnt=%d",
                (unsigned long)interp, interp->refcnt);
     if (interp->refcnt != 0) {
@@ -385,7 +385,7 @@ modperl_interp_t *modperl_interp_pool_se
     else {
         request_rec *r;
         apr_pool_userdata_get((void **)&r, "MODPERL_R", p);
-        ap_assert(r);
+        MP_ASSERT(r);
         MP_TRACE_i(MP_FUNC, "found userdata MODPERL_R in pool %#lx as %lx",
                    (unsigned long)r->pool, (unsigned long)r);
         return modperl_interp_select(r, NULL, NULL);
@@ -490,7 +490,7 @@ modperl_interp_t *modperl_interp_select(
             }
         }
 
-        ap_assert(p);
+        MP_ASSERT(p);
 
 #ifdef MP_TRACE
         apr_pool_cleanup_register(p, (void *)interp,

Modified: perl/modperl/branches/threading/src/modules/perl/modperl_svptr_table.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/threading/src/modules/perl/modperl_svptr_table.c?rev=1242068&r1=1242067&r2=1242068&view=diff
==============================================================================
--- perl/modperl/branches/threading/src/modules/perl/modperl_svptr_table.c (original)
+++ perl/modperl/branches/threading/src/modules/perl/modperl_svptr_table.c Wed Feb  8 20:08:03
2012
@@ -184,7 +184,7 @@ modperl_svptr_table_fetch(pTHX_ PTR_TBL_
 {
     PTR_TBL_ENT_t *tblent;
     UV hash = PTR2UV(sv);
-    ap_assert(tbl);
+    MP_ASSERT(tbl);
     tblent = tbl->tbl_ary[hash & tbl->tbl_max];
     for (; tblent; tblent = tblent->next) {
         if (tblent->oldval == sv)
@@ -205,7 +205,7 @@ modperl_svptr_table_store(pTHX_ PTR_TBL_
     UV hash = PTR2UV(oldv);
     bool i = 1;
 
-    ap_assert(tbl);
+    MP_ASSERT(tbl);
     otblent = &tbl->tbl_ary[hash & tbl->tbl_max];
     for (tblent = *otblent; tblent; i=0, tblent = tblent->next) {
         if (tblent->oldval == oldv) {



Mime
View raw message