|
From: | Ralf Wildenhues |
Subject: | Re: make libltdl work with C++ compilers |
Date: | Mon, 4 Sep 2006 19:28:19 +0200 |
User-agent: | Mutt/1.5.13 (2006-08-11) |
Hello Bob, * Bob Friesenhahn wrote on Sun, Sep 03, 2006 at 06:23:13PM CEST: > > The patch seems mostly ok to me but I tend to wonder if there is more > casting going on than is actually required. For example, strchr() is > already defined to return a 'char *' type so the return value should > not require an explicit cast to 'char *'. Casting should be viewed as > "evil" unless it is intentionally incorporated as part of the design. Definitely. That strrchr cast was a bug, and being cautious, I removed another couple of casts from loadlibrary.c that don't look necessary (tested with GCC; may revisit later with MSVC). The cast of the return value from GetProcAddress is necessary because that returns a function pointer. Thanks for the review. I've installed the patches as follows. Cheers, Ralf
extern-const.diff
Description: Text document
cplusplus.diff
Description: Text document
broken-argz.h.diff
Description: Text document
cpp-linkage-casts.diff
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |