Mailing List Archive

cvs commit: apache-2.0/src/include ap_buckets.h
stoddard 00/08/21 20:20:45

Modified: src ApacheCore.def
src/ap ap_buckets_refcount.c
src/include ap_buckets.h
Log:
Win32: function pointers use C calling convention unless explicitly set to use
stdcall. The 'split' function pointer in ap_buckets.h points to both static functions
(which use C calling convention) and exported functions (which normally use stdcall).
Let's settle on using the C calling convention.

Revision Changes Path
1.29 +7 -3 apache-2.0/src/ApacheCore.def

Index: ApacheCore.def
===================================================================
RCS file: /home/cvs/apache-2.0/src/ApacheCore.def,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- ApacheCore.def 2000/08/15 15:41:30 1.28
+++ ApacheCore.def 2000/08/22 03:20:44 1.29
@@ -430,6 +430,10 @@
ap_xml_quote_string @454
ap_xml_quote_elem @455
ap_xml_insert_uri @456
-
-
-
+;
+; buckets
+ ap_bucket_create_transient @460
+ ap_bucket_split_shared @461
+ ap_bucket_make_shared @462
+ ap_bucket_destroy_shared @463
+



1.3 +1 -1 apache-2.0/src/ap/ap_buckets_refcount.c

Index: ap_buckets_refcount.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_refcount.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ap_buckets_refcount.c 2000/08/19 16:54:45 1.2
+++ ap_buckets_refcount.c 2000/08/22 03:20:44 1.3
@@ -58,7 +58,7 @@

#include "ap_buckets.h"

-API_EXPORT(apr_status_t) ap_bucket_split_shared(ap_bucket *a, apr_off_t point)
+API_EXPORT_NONSTD(apr_status_t) ap_bucket_split_shared(ap_bucket *a, apr_off_t point)
{
ap_bucket *b;
ap_bucket_shared *ad, *bd;



1.14 +1 -1 apache-2.0/src/include/ap_buckets.h

Index: ap_buckets.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/include/ap_buckets.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ap_buckets.h 2000/08/19 16:54:46 1.13
+++ ap_buckets.h 2000/08/22 03:20:45 1.14
@@ -447,7 +447,7 @@
* or APR_SUCCESS
* @deffunc API_EXPORT(apr_status_t) ap_bucket_shared_split(ap_bucket *b, apr_off_t point)
*/
-API_EXPORT(apr_status_t) ap_bucket_split_shared(ap_bucket *b, apr_off_t point);
+API_EXPORT_NONSTD(apr_status_t) ap_bucket_split_shared(ap_bucket *b, apr_off_t point);


/* ***** Functions to Create Buckets of varying type ***** */
RE: cvs commit: apache-2.0/src/include ap_buckets.h [ In reply to ]
> -----Mensaje original-----
> De: fanf@locus.apache.org [SMTP:fanf@locus.apache.org]
> Enviado el: Lunes, 04 de Septiembre de 2000 00:42
> Para: httpd-docs-2.0-cvs@apache.org
> Asunto: cvs commit: apache-2.0/src/include ap_buckets.h
>
> fanf 00/09/03 22:42:20
>
> Modified: src/ap ap_buckets.c ap_buckets_heap.c ap_buckets_pipe.c
> src/include ap_buckets.h
> Log:
> avoid a copy in the pipe bucket read code
> and make the length return argument in ap_bucket_create_heap optional
> (which is only really true when not copying)
>
> Revision Changes Path
> 1.12 +2 -2 apache-2.0/src/ap/ap_buckets.c
>
> Index: ap_buckets.c
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets.c,v
> retrieving revision 1.11
> retrieving revision 1.12
> diff -u -u -r1.11 -r1.12
> --- ap_buckets.c 2000/08/20 03:33:08 1.11
> +++ ap_buckets.c 2000/09/04 05:42:19 1.12
> @@ -208,11 +208,11 @@
> */
> char buf[4096];
> ap_bucket *r;
> - int res, i;
> + int res;
>
> res = apr_vsnprintf(buf, 4096, fmt, va);
>
> - r = ap_bucket_create_heap(buf, strlen(buf), 1, &i);
> + r = ap_bucket_create_heap(buf, strlen(buf), 1, NULL);
> ap_brigade_append_buckets(b, r);
>
> return res;
>
>
>
> 1.10 +2 -1 apache-2.0/src/ap/ap_buckets_heap.c
>
> Index: ap_buckets_heap.c
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_heap.c,v
> retrieving revision 1.9
> retrieving revision 1.10
> diff -u -u -r1.9 -r1.10
> --- ap_buckets_heap.c 2000/08/19 16:54:45 1.9
> +++ ap_buckets_heap.c 2000/09/04 05:42:20 1.10
> @@ -133,7 +133,8 @@
> b->read = heap_read;
> b->setaside = NULL;
>
> - *w = length;
> + if (w)
> + *w = length;
>
> return b;
> }
>
>
>
> 1.5 +11 -14 apache-2.0/src/ap/ap_buckets_pipe.c
>
> Index: ap_buckets_pipe.c
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_pipe.c,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -u -r1.4 -r1.5
> --- ap_buckets_pipe.c 2000/08/31 16:54:12 1.4
> +++ ap_buckets_pipe.c 2000/09/04 05:42:20 1.5
> @@ -67,31 +67,28 @@
> }
>
> /* Ignore the block arg for now. We can fix that tomorrow. */
> -static apr_status_t pipe_read(ap_bucket *b, const char **str,
> +static apr_status_t pipe_read(ap_bucket *b, const char **str,
> apr_ssize_t *len, int block)
> {
> ap_bucket_pipe *bd = b->data;
> ap_bucket *a;
> - apr_size_t l;
> - apr_ssize_t toss;
> - char buf[IOBUFSIZE];
> + char *buf;
> apr_status_t rv;
>
> + /*
> + * XXX: We need to obey the block flag
> + */
> + buf = malloc(IOBUFSIZE);
> + *str = buf;
> *len = IOBUFSIZE;
> if ((rv = apr_read(bd->thepipe, buf, len)) != APR_SUCCESS) {
> + free(buf);
> return rv;
> }
> - if (*len > 0) {
> - l = *len;
> + if (len > 0) {
> a = ap_bucket_create_pipe(bd->thepipe);
> -
> - /* XXX ap_bucket_make_heap() can decide not to copy all our
> data;
> - * either handle it here or ensure that IOBUFSIZE <
> - * DEFAULT_BUCKET_SIZE;
> - */
> - b = ap_bucket_make_heap(b, buf, l, 1, &toss);
> - b->read(b, str, len, block); /* set str to new location of data
> */
> -
> + b = ap_bucket_make_heap(b, buf, *len, 0, NULL);
> +
> if (b->next) {
> b->next->prev = a;
> }
>
>
>
> 1.18 +2 -1 apache-2.0/src/include/ap_buckets.h
>
> Index: ap_buckets.h
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/include/ap_buckets.h,v
> retrieving revision 1.17
> retrieving revision 1.18
> diff -u -u -r1.17 -r1.18
> --- ap_buckets.h 2000/08/29 17:13:48 1.17
> +++ ap_buckets.h 2000/09/04 05:42:20 1.18
> @@ -540,7 +540,8 @@
> * @param buf The buffer to insert into the bucket
> * @param nbyte The size of the buffer to insert.
> * @param copy Whether to copy the data into newly-allocated memory or
> not
> - * @param w The number of bytes actually copied into the bucket
> + * @param w The number of bytes actually copied into the bucket.
> + * If copy is zero then this return value can be ignored by
> passing a NULL pointer.
> * @return The new bucket, or NULL if allocation failed
> * @deffunc ap_bucket *ap_bucket_create_heap(const char *buf,
> apr_size_t nbyte, apr_ssize_t *w)
> */
>
>
>