Avoiding FunctionA/W Duplication
Dimitrie O. Paun
dpaun at rogers.com
Tue Nov 5 19:51:38 CST 2002
On November 5, 2002 08:23 pm, Alexandre Julliard wrote:
> Of course another problem with option 5 is that you lose all type
> checking, so the compiler cannot warn you when you confuse the string
> types, plus it requires ugly casts. Better avoided IMO.
I have to agree, even if in listview.c I used this technique. I did
manage to avoid the ugly casts, and the compiler warnings are not
really a problem (for various reasons), but it required careful coding,
and at the end of the day, I don't think I would want it generalized
in other parts of the code, despite it working to our advantage in
the listview.c case. The pitfalls are not worth the trouble in general.
More information about the wine-devel