apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r330141 - /apr/apr-util/trunk/dbd/apr_dbd.c
Date Tue, 01 Nov 2005 22:40:46 GMT
Author: niq
Date: Tue Nov  1 14:40:42 2005
New Revision: 330141

URL: http://svn.apache.org/viewcvs?rev=330141&view=rev
Log:
PR#37325

Modified:
    apr/apr-util/trunk/dbd/apr_dbd.c

Modified: apr/apr-util/trunk/dbd/apr_dbd.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/dbd/apr_dbd.c?rev=330141&r1=330140&r2=330141&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd.c Tue Nov  1 14:40:42 2005
@@ -27,6 +27,7 @@
 
 static apr_hash_t *drivers = NULL;
 
+#define CLEANUP_CAST (apr_status_t (*)(void*))
 
 /* Once the autofoo supports building it for dynamic load, we can use
  * #define APR_DSO_BUILD APR_HAS_DSO
@@ -70,7 +71,8 @@
 
 #if APR_HAS_THREADS
     ret = apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, pool);
-    apr_pool_cleanup_register(pool, mutex, (void*)apr_thread_mutex_destroy,
+    apr_pool_cleanup_register(pool, mutex,
+                              CLEANUP_CAST apr_thread_mutex_destroy,
                               apr_pool_cleanup_null);
 #endif
 
@@ -176,7 +178,8 @@
 {
     int ret = driver->start_transaction(pool, handle, trans);
     if (*trans) {
-        apr_pool_cleanup_register(pool, *trans, (void*)driver->end_transaction,
+        apr_pool_cleanup_register(pool, *trans,
+                                  CLEANUP_CAST driver->end_transaction,
                                   apr_pool_cleanup_null);
     }
     return ret;
@@ -185,7 +188,7 @@
                                          apr_pool_t *pool,
                                          apr_dbd_transaction_t *trans)
 {
-    apr_pool_cleanup_kill(pool, trans, (void*)driver->end_transaction);
+    apr_pool_cleanup_kill(pool, trans, CLEANUP_CAST driver->end_transaction);
     return driver->end_transaction(trans);
 }
 



Mime
View raw message