[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: where has ber_bvdup() gone?



> 
> >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.

Ciao, Ando.