URL: https://github.com/freeipa/freeipa/pull/410
Title: #410: ipa-kdb: support KDB DAL version 6.1

simo5 commented:
Also I know you can use ifdefs to avoid copy&pasting large parts of the 
structure initialization but I would prefer 3 separate full inits based only on 
ifdefs on the DAL version numbers.
in pseudo:
if v5:
  vtable = { ... }
elif v6.0:
  vtable = { ... }
elid v6.1:
  vtable = { ... }

Those tables cannot change so using ifdefs in them can only risk to introduce 
bugs in one of the versions rather than help reduce code duplication.

See the full comment at 
Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to