[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: omission in draft-ietf-ldapext-ldap-c-api-03.txt section 27.1
Hallvard B Furuseth wrote:
>
> Mark Smith writes:
> > The prototype for ber_peek_tag was changed -- 'const' was added in
> > front of the ber parameter to indicate that API implementations
> > are not allowed to alter the contents of the BerElement when
> > executing the peek tag call.
>
> Nitpick:
>
> I think it's unwise to make opaque types 'const' (in ber_flatten and
> ber_keep_tag): it makes it harder for the library to do internal
> bookkeeping. Example: The library might want to store huge BerElements
> in files. At the first access, an element's file would be opened and
> the file descriptor would be stored in the BerElement. You can kludge
> around this with
> typedef struct berelement {
> struct {
> ...real meat of BerElement...
> } *contents;
> } BerElement;
> but I don't think a mere 'const' is worth it.
(Sorry for the delayed response; this comment slipped through the cracks
in my busy inbox). After thinking about this a bit and consulting with
a couple of other implementors, I agree and believe we should remove
'const' from the BerElement parameters in the prototypes for
ber_peek_tag() and ber_flatten().
--
Mark Smith
Directory Architect / Sun-Netscape Alliance
My words are my own, not my employer's. Got LDAP?