httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Anderson <...@redes.int.com.mx>
Subject Re: Apache 1.3b3 compiled with g++, looking for a test suite.
Date Tue, 20 Jan 1998 17:29:39 GMT
Dean Gaudet wrote:
> 
> Can someone explain to me why you need to compile all the
> code with C++? C++ allows you to mix C and C++ code.  I
> see no reason for us to do extensive surgery to the code
> when you could just put extern "C" into all the header files
> and build your own modules with C++.

I prefer the tighter type checking available in C++.

> On Mon, 19 Jan 1998, Michael Anderson wrote:
> 
> > 1. "pool" is used at least 3 ways:
> >       a) struct pool { ... }
> >       b) typedef struct pool pool
> >       c) pool *pool
> >
> >       I changed "struct pool" to "struct POOL",
> >       "typedef struct pool pool" to "typedef struct POOL Pool;",
> >       all possible references of "struct pool" to
> >       Pool, and all types from "pool" to "Pool".
> 
> This is unacceptable as it causes changes to all existing
> modules, including those not distributed with Apache. You
> should change the locals to "ptr_pool" as suggested, leave
> the typedef alone, and change the struct to "struct pool_struct".

Good point. There are many ways to change code - yours is much
better at maintaining backwards compatibility. Thats why I
explained my changes - to get the feedback.

> > 2. several functions such as palloc(), get_module_config(), etc.
> > needed casts on their return values.
> 
> Ugh. wastage. I hate this crap, void * is a C construct,
> I don't care that C++ totally screws it up. casts are evil,
>  they hide information.

Agreed. C++ should have left void * alone.


You don't, by any chance, know of an available test suite?

-- 

Mike Anderson
mka@redes.int.com.mx
Guanajuato, GTO, Mexico

Mime
View raw message