You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bo...@apache.org on 2006/06/07 13:38:04 UTC
svn commit: r412373 - /apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite2.c
Author: bojan
Date: Wed Jun 7 04:38:04 2006
New Revision: 412373
URL: http://svn.apache.org/viewvc?rev=412373&view=rev
Log:
Merge r412372 from trunk to 1.2.x branch
Original message: Don't cast cleanup functions, provide wrappers instead.
Modified:
apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite2.c
Modified: apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite2.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite2.c?rev=412373&r1=412372&r2=412373&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite2.c (original)
+++ apr/apr-util/branches/1.2.x/dbd/apr_dbd_sqlite2.c Wed Jun 7 04:38:04 2006
@@ -67,6 +67,11 @@
} \
} while(0);
+static apr_status_t free_table(void *data)
+{
+ sqlite_free_table(data);
+ return APR_SUCCESS;
+}
static int dbd_sqlite_select(apr_pool_t * pool, apr_dbd_t * sql,
apr_dbd_results_t ** results, const char *query,
@@ -97,7 +102,7 @@
(*results)->random = seek;
if (tuples > 0)
- apr_pool_cleanup_register(pool, result, (void *) sqlite_free_table,
+ apr_pool_cleanup_register(pool, result, free_table,
apr_pool_cleanup_null);
ret = 0;
@@ -207,11 +212,17 @@
return ret;
}
+static apr_status_t free_mem(void *data)
+{
+ sqlite_freemem(data);
+ return APR_SUCCESS
+}
+
static const char *dbd_sqlite_escape(apr_pool_t * pool, const char *arg,
apr_dbd_t * sql)
{
char *ret = sqlite_mprintf("%q", arg);
- apr_pool_cleanup_register(pool, ret, (void *) sqlite_freemem,
+ apr_pool_cleanup_register(pool, ret, free_mem,
apr_pool_cleanup_null);
return ret;
}