[Freeipa-devel] [freeipa PR#410][comment] ipa-kdb: support KDB DAL version 6.1

simo5 freeipa-github-notification at redhat.com
Tue Jan 24 13:53:30 UTC 2017


  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 = { ... }
else:
  error!

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 https://github.com/freeipa/freeipa/pull/410#issuecomment-274808126


More information about the Freeipa-devel mailing list