summaryrefslogtreecommitdiff
path: root/buckets/apr_buckets_mmap.c
diff options
context:
space:
mode:
authorgstein <gstein@13f79535-47bb-0310-9956-ffa450edef68>2000-10-15 22:24:19 +0000
committergstein <gstein@13f79535-47bb-0310-9956-ffa450edef68>2000-10-15 22:24:19 +0000
commitfd94d3a4b5dbec6ca037a887fad7b2734f84ddfe (patch)
tree3a74889ea4626fd392b9b541bfc9caa613efa6e4 /buckets/apr_buckets_mmap.c
parent81bea7f02d7eb169535d38bc8a0079234fdc95bf (diff)
downloadlibapr-util-fd94d3a4b5dbec6ca037a887fad7b2734f84ddfe.tar.gz
const-ify the type stuff and simplify the type registration process
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@57894 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'buckets/apr_buckets_mmap.c')
-rw-r--r--buckets/apr_buckets_mmap.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/buckets/apr_buckets_mmap.c b/buckets/apr_buckets_mmap.c
index 4b73fe15..20042d38 100644
--- a/buckets/apr_buckets_mmap.c
+++ b/buckets/apr_buckets_mmap.c
@@ -84,9 +84,6 @@ static void mmap_destroy(void *data)
free(m);
}
-ap_bucket_type ap_mmap_type = { "MMAP", 4, mmap_destroy, mmap_read,
- ap_bucket_setaside_notimpl, ap_bucket_split_shared };
-
/*
* XXX: are the start and length arguments useful?
*/
@@ -119,8 +116,10 @@ API_EXPORT(ap_bucket *) ap_bucket_create_mmap(
ap_bucket_do_create(ap_bucket_make_mmap(b, mm, start, length));
}
-void ap_bucket_mmap_register(apr_pool_t *p)
-{
- ap_insert_bucket_type(&ap_mmap_type);
-}
-
+const ap_bucket_type ap_mmap_type = {
+ "MMAP", 4,
+ mmap_destroy,
+ mmap_read,
+ ap_bucket_setaside_notimpl,
+ ap_bucket_split_shared
+};