jwoolley 01/02/27 20:41:15
Modified: . CHANGES
buckets apr_buckets.c
include apr_buckets.h
Log:
Remove apr_bucket_init_types() and apr_bucket_insert_type(), which
aren't needed anymore. We stopped needing them when we switched
to using apr_bucket_type_t structs for each type.
Revision Changes Path
1.2 +4 -0 apr-util/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr-util/CHANGES,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -u -r1.1 -r1.2
--- CHANGES 2001/02/27 20:45:35 1.1
+++ CHANGES 2001/02/28 04:41:13 1.2
@@ -1,5 +1,8 @@
Changes with APR-util b1
+ *) apr_bucket_init_types() and apr_bucket_insert_type() have been
+ removed... they're not needed anymore. [Cliff Woolley]
+
*) The apr_bucket_shared and apr_bucket_simple structures have been
removed as an API simplification/optimization. This should be
transparent outside APR-util except to callers who attempt to
@@ -15,3 +18,4 @@
'apr_off_t length' rather than 'apr_off_t end', since the
end usually had to be computed by the caller and all we
really want is the length anyway. [Cliff Woolley]
+
1.49 +6 -44 apr-util/buckets/apr_buckets.c
Index: apr_buckets.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_buckets.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -u -r1.48 -r1.49
--- apr_buckets.c 2001/02/16 04:17:07 1.48
+++ apr_buckets.c 2001/02/28 04:41:14 1.49
@@ -52,63 +52,25 @@
* <http://www.apache.org/>.
*/
-#include "apr.h"
-#include "apr_lib.h"
-#include "apr_pools.h"
-#include "apr_tables.h"
-#include "apr_errno.h"
-
-#include <stdlib.h>
-#if APR_HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#if APR_HAVE_SYS_UIO_H
-#include <sys/uio.h>
-#endif
-
#include "apr_buckets.h"
-static apr_array_header_t *bucket_types;
-
-APU_DECLARE(void) apr_bucket_init_types(apr_pool_t *p)
-{
- bucket_types = apr_array_make(p, 8, sizeof(apr_bucket_type_t));
-
- apr_bucket_insert_type(&apr_bucket_type_eos);
- apr_bucket_insert_type(&apr_bucket_type_file);
- apr_bucket_insert_type(&apr_bucket_type_heap);
-#if APR_HAS_MMAP
- apr_bucket_insert_type(&apr_bucket_type_mmap);
-#endif
- apr_bucket_insert_type(&apr_bucket_type_pipe);
- apr_bucket_insert_type(&apr_bucket_type_immortal);
- apr_bucket_insert_type(&apr_bucket_type_transient);
- apr_bucket_insert_type(&apr_bucket_type_socket);
-}
-
-APU_DECLARE(int) apr_bucket_insert_type(const apr_bucket_type_t *type)
-{
- const apr_bucket_type_t **newone;
-
- newone = (const apr_bucket_type_t **)apr_array_push(bucket_types);
- newone = &type;
-
- return bucket_types->nelts - 1;
-}
-
APU_DECLARE_NONSTD(apr_status_t) apr_bucket_setaside_notimpl(apr_bucket
*data)
{
return APR_ENOTIMPL;
}
-APU_DECLARE_NONSTD(apr_status_t) apr_bucket_split_notimpl(apr_bucket *data,
apr_off_t point)
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_split_notimpl(apr_bucket *data,
+ apr_off_t point)
{
return APR_ENOTIMPL;
}
-APU_DECLARE_NONSTD(apr_status_t) apr_bucket_copy_notimpl(apr_bucket *e,
apr_bucket **c)
+
+APU_DECLARE_NONSTD(apr_status_t) apr_bucket_copy_notimpl(apr_bucket *e,
+ apr_bucket **c)
{
return APR_ENOTIMPL;
}
+
APU_DECLARE_NONSTD(void) apr_bucket_destroy_notimpl(void *data)
{
return;
1.84 +0 -14 apr-util/include/apr_buckets.h
Index: apr_buckets.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_buckets.h,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -u -r1.83 -r1.84
--- apr_buckets.h 2001/02/27 20:45:38 1.83
+++ apr_buckets.h 2001/02/28 04:41:14 1.84
@@ -723,14 +723,6 @@
/* ***** Bucket Functions ***** */
/**
- * Initialize the core implemented bucket types. Once this is done,
- * it is possible to add new bucket types to the server
- * @param p The pool to allocate the array from.
- * @deffunc void apr_bucket_init_types(apr_pool_t *p)
- */
-APU_DECLARE(void) apr_bucket_init_types(apr_pool_t *p);
-
-/**
* Free the resources used by a bucket. If multiple buckets refer to
* the same resource it is freed when the last one goes away.
* @see apr_bucket_delete()
@@ -838,12 +830,6 @@
/* There is no apr_bucket_read_notimpl, because it is a required function
*/
-/**
- * Register a new bucket type
- * @param type The new bucket type to register
- * @return The offset into the array in which the bucket types are stored
- */
-APU_DECLARE(int) apr_bucket_insert_type(const apr_bucket_type_t *type);
/* All of the bucket types implemented by the core */
/**