diff options
author | Ryan Bloom <rbb@apache.org> | 2000-08-01 15:41:54 +0000 |
---|---|---|
committer | Ryan Bloom <rbb@apache.org> | 2000-08-01 15:41:54 +0000 |
commit | f4898ad7a99fb070b9349ee1ddd0d04e40a3dacd (patch) | |
tree | b3d7a9c4c1d6adba502ff4224ee9a2a29ca67b1c /buckets | |
parent | 35158b213bc2ae60a6ea552eda4a0816e1f18cd5 (diff) | |
download | apr-f4898ad7a99fb070b9349ee1ddd0d04e40a3dacd.tar.gz |
Make ap_bucket_list_destroy a static function. It should never be used
outside the buckets code.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60466 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'buckets')
-rw-r--r-- | buckets/ap_buf.c | 36 | ||||
-rw-r--r-- | buckets/apr_buf.h | 6 |
2 files changed, 14 insertions, 28 deletions
diff --git a/buckets/ap_buf.c b/buckets/ap_buf.c index 1c6238da6..69de82cd4 100644 --- a/buckets/ap_buf.c +++ b/buckets/ap_buf.c @@ -72,19 +72,7 @@ APR_EXPORT(ap_status_t) ap_bucket_destroy(ap_bucket *e) return APR_SUCCESS; } -APR_EXPORT(ap_status_t) ap_brigade_destroy(void *data) -{ - ap_bucket_brigade *b = data; - - ap_bucket_list_destroy(b->head); - /* The brigade itself is allocated out of a pool, so we don't actually - * want to free it. If we did, we would do that free() here. - */ - - return APR_SUCCESS; -} - -APR_EXPORT(ap_status_t) ap_bucket_list_destroy(ap_bucket *e) +static ap_status_t ap_bucket_list_destroy(ap_bucket *e) { ap_bucket *cur = e; ap_bucket *next; @@ -97,6 +85,18 @@ APR_EXPORT(ap_status_t) ap_bucket_list_destroy(ap_bucket *e) return APR_SUCCESS; } +APR_EXPORT(ap_status_t) ap_brigade_destroy(void *data) +{ + ap_bucket_brigade *b = data; + + ap_bucket_list_destroy(b->head); + /* The brigade itself is allocated out of a pool, so we don't actually + * want to free it. If we did, we would do that free() here. + */ + + return APR_SUCCESS; +} + APR_EXPORT(ap_bucket_brigade *) ap_brigade_create(ap_pool_t *p) { ap_bucket_brigade *b; @@ -137,8 +137,8 @@ APR_EXPORT(int) ap_brigade_to_iovec(ap_bucket_brigade *b, orig = vec; e = b->head; while (e && nvec) { - vec->iov_base = (void *)ap_get_bucket_char_str(e); vec->iov_len = ap_get_bucket_len(e); + vec->iov_base = (void *)e->read(e); e = e->next; --nvec; ++vec; @@ -203,14 +203,6 @@ APR_EXPORT(ap_status_t) ap_brigade_to_iol(ap_ssize_t *total_bytes, return APR_SUCCESS; } -APR_EXPORT(const char *) ap_get_bucket_char_str(ap_bucket *b) -{ - if (b) { - return b->read(b); - } - return NULL; -} - APR_EXPORT(int) ap_get_bucket_len(ap_bucket *b) { if (b) { diff --git a/buckets/apr_buf.h b/buckets/apr_buf.h index 72ef78cb2..3c1d4b59b 100644 --- a/buckets/apr_buf.h +++ b/buckets/apr_buf.h @@ -358,12 +358,6 @@ APR_EXPORT(int) ap_brigade_vprintf(ap_bucket_brigade *b, const char *fmt, va_lis */ APR_EXPORT(ap_status_t) ap_bucket_destroy(ap_bucket *e); -/* destroy an entire list of buckets. I am not sure how useful this is, - * because it basically duplicates some logic in the bucket_brigade section. - * I need to review where this is used and remove it if at all possible. - */ -APR_EXPORT(ap_status_t) ap_bucket_list_destroy(ap_bucket *e); - /* get the length of the data in the bucket that is currently being * referenced. The bucket may contain more data, but if the start or end * has been moved, we really don't care about it. |