You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philippe M. Chiasson" <go...@cpan.org> on 2001/11/12 09:21:19 UTC

[Patch] const correctness...

Apparently the httpd folks changed the const'ness of some table stuff.

This patch fixes that and makes latest mod_perl compile again with
-Wall -Werror

/home/gozer/sources/mod_perl2/deps/perl-12948/bin/perl build/cvsdiff 
Index: src/modules/perl/modperl_config.c
===================================================================
RCS file: /home/anoncvs/mod_perl-2-cvs/src/modules/perl/modperl_config.c,v
retrieving revision 1.46
diff -u -I'$Id' -I'$Revision' -r1.46 modperl_config.c
--- src/modules/perl/modperl_config.c	5 Nov 2001 05:19:01 -0000	1.46
+++ src/modules/perl/modperl_config.c	12 Nov 2001 08:20:33 -0000
@@ -20,7 +20,7 @@
 /* take the 'base' values, and override with 'add' values if any */
 #define merge_table_overlap_item(item) \
     { \
-        apr_array_header_t *arr = apr_table_elts(base->item); \
+        const apr_array_header_t *arr = apr_table_elts(base->item); \
         apr_table_entry_t *entries  = (apr_table_entry_t *)arr->elts; \
         int i; \
         mrg->item = apr_table_copy(p, add->item); \

Index: src/modules/perl/modperl_env.c
===================================================================
RCS file: /home/anoncvs/mod_perl-2-cvs/src/modules/perl/modperl_env.c,v
retrieving revision 1.17
diff -u -I'$Id' -I'$Revision' -r1.17 modperl_env.c
--- src/modules/perl/modperl_env.c	20 Oct 2001 17:38:16 -0000	1.17
+++ src/modules/perl/modperl_env.c	12 Nov 2001 08:20:33 -0000
@@ -84,7 +84,7 @@
     HV *hv = ENVHV;
     U32 mg_flags;
     int i;
-    apr_array_header_t *array;
+    const apr_array_header_t *array;
     apr_table_entry_t *elts;
 
 

Index: xs/APR/Table/APR__Table.h
===================================================================
RCS file: /home/anoncvs/mod_perl-2-cvs/xs/APR/Table/APR__Table.h,v
retrieving revision 1.6
diff -u -I'$Id' -I'$Revision' -r1.6 APR__Table.h
--- xs/APR/Table/APR__Table.h	7 Nov 2001 03:39:08 -0000	1.6
+++ xs/APR/Table/APR__Table.h	12 Nov 2001 08:20:33 -0000
@@ -150,7 +150,7 @@
             }
         }
         else {
-            apr_array_header_t *arr = apr_table_elts(t);
+            const apr_array_header_t *arr = apr_table_elts(t);
             apr_table_entry_t *elts  = (apr_table_entry_t *)arr->elts;
             int i;
             


-- 
Philippe M. Chiasson  <go...@cpan.org>
  Extropia's Resident System Guru
     http://www.eXtropia.com/

/* When we have more time, we can teach the penguin to say 
  * "By your command" or "Activating turbo boost, Michael".
  */ 
	-- Linux	2.2.16
	/usr/src/linux/arch/sparc/prom/sun4prom.c

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl Hacker!\n$/&&print||$$++&&redo}'

Re: [Patch] const correctness...

Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 12 Nov 2001, Philippe M. Chiasson wrote:

> Apparently the httpd folks changed the const'ness of some table stuff.
> 
> This patch fixes that and makes latest mod_perl compile again with
> -Wall -Werror

thanks, that's in.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org