Re: CVS update: subversion/subversion/libsvn_subr svn_string.c
From: Branko Èibej <brane_at_xbc.nu>
Date: 2000-10-14 03:27:51 CEST
Greg Hudson wrote:
O.K., maybe you can't avoid the cast in this case -- although you could
(Guess, guess: you're doing this in the svndiff (en|de)coder, where
> Some of our code does make a habit of explicitly casting from void *
That's so -- foo* -> void* is implicit, void* -> foo* requires a cast in
http://subversion.tigris.org/subversion-dev/current/msg00014.html),
that only the public interface should be C++-clean so that SVN clients
Well, anyway, I'm not fanatically opposed to casts -- sometimes they're
a) Casts can hide bugs. Even worse, they can prevent the compiler
b) It's almost impossible to find them in C. Try grepping for a cast
At the very least I'd like to make everyone stop and think before
#define SVN_CAST(TYPE) (TYPE)
somewhere in the headers and decreeing that this is the only way to do
Worried about how to enforce that rule? That's what
(If you guessed from the above that I've been bitten by unnecessary
P.S.: This is my last message for about a week, as I'll be totally
-- Brane �ibej home: <brane_at_xbc.nu> http://www.xbc.nu/brane/ ACM: <brane_at_acm.org> http://www.acm.org/Received on Sat Oct 21 14:36:11 2006 |
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.