httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@kiwi.ICS.UCI.EDU>
Subject Re: [PATCH] table_do has improper prototype
Date Tue, 01 Apr 1997 08:57:31 GMT
>table_do takes an int(*)(void *, char *, char *) but those should be const
>char * otherwise it violates the abstraction of tables (i.e. would break
>if we made them into hash_tables).  Also the casting of send_header_field
>in http_protocol.c overrides C's (meagre) type-checking.

Ummm, no it doesn't violate the abstraction of tables (only the key
and value is passed) and the intention is that they be modifiable
by the routine. const is not desirable in this case, and the casting
is necessary to avoid warnings on my (2.7.2) gcc.

>Roy, this makes send_header_field a static... whereas it looks like you
>intended it to be useable outside http_protocol.c.

Yes, I did (note the declaration in http_protocol.h).

>Are there really broken compilers that require you to (void *)r when
>passing to a prototyped void * parameter?

Yes.

.....Roy  (-1)

Mime
View raw message