[Date Prev][Date Next]
Re: char* parameters -> const char* ?
Sorry for not responding sooner... I've been a bit overwhelmed.
At 10:23 PM 9/15/98 +0000, you wrote:
>a) do functions like ldap_bind() alter the char* arguments? (as a
>correlary, will the ldap code alter the char**'s used in rebindproc
The char* arguments to ldap_bind are not altered. It also does
not modify rebindproc returned strings.
>b) if no changes are made, would it be possible to change the
>declaration of these functions to include const char*, which would
>provide a reassurance about what the code is in fact doing. (and allow
>the use of standard C++ strings without casting).
We could change them like some vendors (ie: Netscape) have. The only
issue is how strict do you want to follow the published specs (RFC_1823
for v2, draft-ietf-ldapext-ldap-c-api-01 for v3) and what problems might
occur do that change.
We could make the change conditional. That is, have a flag -DLDAP_API_STRICT
or -DLDAP_API_CONST (depending on what we decide the default behavior
should be) that would define LDAP_CONST appropriately. The prototypes
would get a uglier, but it would provide a bit of flexibility.