diff options
author | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2001-01-19 03:13:02 +0000 |
---|---|---|
committer | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2001-01-19 03:13:02 +0000 |
commit | 902134ea04eb2cd97ee7ab340895744d9353ce3e (patch) | |
tree | 5c979cc1ddbb3d1178e7d5dc58c04655a6a6f995 /dso/beos | |
parent | 46ca5469febcf0dfa08726d2700ce965fb1b25ee (diff) | |
download | libapr-902134ea04eb2cd97ee7ab340895744d9353ce3e.tar.gz |
All platforms now register a cleanup when a DSO is loaded. This just
makes a practice uniform across all platforms. In the past, this was
done differently on different platforms.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61076 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso/beos')
-rw-r--r-- | dso/beos/dso.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dso/beos/dso.c b/dso/beos/dso.c index bb01d858c..4306db765 100644 --- a/dso/beos/dso.c +++ b/dso/beos/dso.c @@ -56,6 +56,12 @@ #if APR_HAS_DSO +static apr_status_t dso_cleanup(void *thedso) +{ + apr_dso_handle_t *dso = thedso; + return apr_dso_unload(dso); +} + APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, const char *path, apr_pool_t *ctx) { @@ -67,6 +73,9 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, const char *res_handle = apr_pcalloc(ctx, sizeof(*res_handle)); (*res_handle)->handle = newid; (*res_handle)->cont = ctx; + + apr_register_cleanup(ctx, *res_handle, dso_cleanup, apr_null_cleanup); + return APR_SUCCESS; } |