[Date Prev][Date Next]
Re: where has ber_bvdup() gone?
- To: openldap-devel@OpenLDAP.org
- Subject: Re: where has ber_bvdup() gone?
- From: Pierangelo Masarati <firstname.lastname@example.org>
- Date: Sat, 5 Jan 2002 17:55:09 +0100 (MET)
- In-reply-to: <200201051609.DAA01764@au.padl.com> from Luke Howard at Jan "6," 2002 "03:09:25" am
> >I guess you're right. That hack came out of an optimization Howard Chu
> >recently added; I think he decided to replace the function with a macro
> >to delay (maybe forever) the replacement of many calls throughout the
> >code. I checked the draft-ietf-ldapext-ldap-c-api-xx.txt and the function
> >is mentioned; this will possibly require replacing the calls to ber_bvdup()
> >and deleting the macro.
> >Consider however that this is HEAD code; the macro could also be confined
> >to the server.
> Well, there are very few calls left to ber_bvdup() in the server, so they
> could easily be replaced to use ber_dupbv() instead.
Done, please test. Note that I rewrote ber_bvdup in terms ov ber_dupbv
for consistency; note also that most if not all the places where ber_bvdup
was still in use got improved from using ber_dupbv because this allows
to use statically allocated struct bervals instead of struct berval *;
your code may also gain from consistently using ber_dupbv.