On Wed, Nov 08, 2000 at 07:34:33AM -0800, Geoff Thorpe wrote:
[...]
whose internals are generally only managed inside OpenSSL anyway. Eg. the
caller may pass a const X509* pointer, but the caller is generally not
supposed to be using the structure's internals directly anyway - the use
of
%% Ben Laurie [EMAIL PROTECTED] writes:
bl "Paul D. Smith" wrote:
It's worse than that: you have to provide two different data
structures internally. Unless you're going to cast internally, and
if so why bother to have two API's anyway? It quickly reaches the
point of
From: Geoff Thorpe [EMAIL PROTECTED]
Hi there,
[snip]
psmith IMHO this is a legitimate reason to cast away const, and that
psmith the "const" notation on the arguments to lhash is useful for
psmith self-documentation purposes, at the least.
Hmm, perhaps you're right. I'm just
%% Ben Laurie [EMAIL PROTECTED] writes:
Are you saying you just don't use const, or that you provide two
different functions or two interfaces to the same function?
bl The latter.
To me, that's much more ugly than simply casting it.
This is C, not C++, and we do the best we can with
"Paul D. Smith" wrote:
%% Ben Laurie [EMAIL PROTECTED] writes:
Are you saying you just don't use const, or that you provide two
different functions or two interfaces to the same function?
bl The latter.
To me, that's much more ugly than simply casting it.
This is C, not
Richard Levitte - VMS Whacker wrote:
From: Ben Laurie [EMAIL PROTECTED]
ben Like strstr()...
ben
benbl Just because the C libraries are broken doesn't mean we should
benbl break ours. In Apache we fix these rather than live with them.
ben
ben How exactly do you fix them?
From: Ben Laurie [EMAIL PROTECTED]
ben No, you have two, a const and a non-const version.
Fine, I'll give it a shot. I do not believe in it, but I will.
--
Richard Levitte \ Spannvägen 38, II \ [EMAIL PROTECTED]
Chairman@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47
Redakteur@Stacken
"Paul D. Smith" wrote:
%% Ben Laurie [EMAIL PROTECTED] writes:
bl By wrapping them with correctly declared functions.
Are you saying you just don't use const, or that you provide two
different functions or two interfaces to the same function?
The latter.
I don't think either of
such a
string must make a local copy first.
My .02 cents worth...
- Original Message -
From: Lutz Jaenicke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 08, 2000 10:08 AM
Subject: Re: Constification
On Wed, Nov 08, 2000 at 04:01:13PM +0100, Richard Levitte - VMS Whacker
wrote
Hi there,
I'm gonna spill my splein here because, just like Richard and Paul have
done now and in the past, I have suffered at the hands of a well-meaning
mission to constify parts of OpenSSL.
On Wed, 8 Nov 2000, Ben Laurie wrote:
Richard Levitte - VMS Whacker wrote:
From: "Paul D.
-Original Message-
From: Richard Levitte - VMS Whacker [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 07, 2000 8:55 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Constification
From: "Paul D. Smith" [EMAIL PROTECTED]
psmith This is similar to
Richard Levitte - VMS Whacker wrote:
From: "Paul D. Smith" [EMAIL PROTECTED]
psmith This is similar to standard C functions which take a const
psmith char*, for example, and return a char* that points into the
psmith string.
Like strstr()...
Just because the C libraries are broken
%% Ben Laurie [EMAIL PROTECTED] writes:
Like strstr()...
bl Just because the C libraries are broken doesn't mean we should
bl break ours. In Apache we fix these rather than live with them.
How exactly do you fix them?
--
From: Ben Laurie [EMAIL PROTECTED]
ben Like strstr()...
ben
benbl Just because the C libraries are broken doesn't mean we should
benbl break ours. In Apache we fix these rather than live with them.
ben
ben How exactly do you fix them?
ben
ben By wrapping them with correctly
%% Ben Laurie [EMAIL PROTECTED] writes:
bl By wrapping them with correctly declared functions.
Are you saying you just don't use const, or that you provide two
different functions or two interfaces to the same function?
I don't think either of these two options is better than deconstifying
On Wed, Nov 08, 2000 at 04:01:13PM +0100, Richard Levitte - VMS Whacker wrote:
So, either:
const char *correct_strstr(const char *s1, const char *s2)
{
return strstr(s1, s2);
}
or:
char *correct_strstr(char *s1, const char *s2)
{
return strstr(s1,
Richard Levitte - VMS Whacker wrote:
I've become irritated enough with some functions not having const used
properly (or at least what appears proper), so I've started working on
bringing better use of const to OpenSSL, as some may already have
noticed.
This may, for a few days, bring
From: Dr S N Henson [EMAIL PROTECTED]
drh There's a couple of areas I noticed that could be constified. The EVP
drh library's use of EVP_MD and EVP_CIPHER is the main one. I also noticed
drh that the version strings for some reason weren't constified.
Thanks, I'll look at those next (after I've
From: "Paul D. Smith" [EMAIL PROTECTED]
psmith This is similar to standard C functions which take a const
psmith char*, for example, and return a char* that points into the
psmith string.
Like strstr()...
psmith IMHO this is a legitimate reason to cast away const, and that
psmith the "const"
%% Richard Levitte - VMS Whacker [EMAIL PROTECTED] writes:
rl From: "Paul D. Smith" [EMAIL PROTECTED]
psmith This is similar to standard C functions which take a const
psmith char*, for example, and return a char* that points into the
psmith string.
rl Like strstr()...
Yep. Plus
On Tue, Nov 07, 2000, Paul D. Smith wrote:
I sent this patch back on 05 May 2000, constifying crypto/lhash.
Your patch can only be accepted if you CC it to [EMAIL PROTECTED]
__
OpenSSL Project
I've started working on bringing better use of const to OpenSSL
Huzzah.
Also, this will bring about a few ugly casts in the ASN.1 macros or
direct callers of them.
Perhaps something like
#define CONST(t, p) (const t)(p)
#define UNCONST(t, p) (t)(p)
As in
extern void
22 matches
Mail list logo