httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject Re: [apreq-2] order of declarations
Date Wed, 23 Apr 2003 06:30:28 GMT
On Wed, 23 Apr 2003, Stas Bekman wrote:

[ .. ] 
> What happens if you do this:
> 
> #define foo(c) APREQ_ENV.in(c, "Content-Type")
>      if (parser->v.size == 0) {
>          const char *bdry, *ct = foo(req->env);
>          apr_size_t blen;

Problem solved, I think ... This recent commit
================================================================
Index: apreq_env.h
===================================================================
RCS file: /home/cvspublic/httpd-apreq-2/src/apreq_env.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- apreq_env.h	12 Apr 2003 15:42:11 -0000	1.9
+++ apreq_env.h	22 Apr 2003 21:00:13 -0000	1.10
@@ -89,7 +89,7 @@
 
 #define apreq_env_config(c) APREQ_ENV.config(c)
 
-#define apreq_env_content_type(c) APREQ_ENV.in(c, "Content-Type");
+#define apreq_env_content_type(c) APREQ_ENV.in(c, "Content-Type")
 #define apreq_env_cookie(c) APREQ_ENV.in(c, "Cookie")
 #define apreq_env_cookie2(c) APREQ_ENV.in(c, "Cookie2")
 #define apreq_env_set_cookie(c,s) APREQ_ENV.out(c,"Set-Cookie",s)
====================================================================
allows the original form of apreq_parsers.c:
===============================================================
Index: apreq_parsers.c
===================================================================
RCS file: /home/cvspublic/httpd-apreq-2/src/apreq_parsers.c,v
retrieving revision 1.18
diff -u -r1.18 apreq_parsers.c
--- apreq_parsers.c	21 Apr 2003 16:09:09 -0000	1.18
+++ apreq_parsers.c	23 Apr 2003 06:32:22 -0000
@@ -751,11 +751,10 @@
 #define MFD_ERROR   -1
 
     if (parser->v.size == 0) {
-        const char *bdry, *ct;
+        const char *bdry, *ct = apreq_env_content_type(req->env);
         apr_size_t blen;
         apr_status_t s;
 
-        ct = apreq_env_content_type(req->env);
         memcpy(ctx->bdry, CRLF "--", 4);
 
         s = nextval(&ct, "boundary", &bdry, &blen);
==================================================================
to now compile fine - I guess it was the extraneous ';' at
the end of the #define for apreq_env_content_type() that was
confusing VC++.

-- 
best regards,
randy


Mime
View raw message