Henrik Nordstrom wrote:
hnordstrom has voted approve.
Status is now: Approved
Comment:
Looks fine.

But the patch highlighted another minor issue.. we should get the hier strings autogenerated from the enum. Having lists like that in the source is quite errorprone.


Aye, spent some time looking for such in the code before discovering we did not already do it.

Anyone have good ideas how to do that?

It looks from a short search like the best ways are to have a data file and generate both enum and string array code at build-time from those.

Something that does a general:
  X.codes -> X_code.h + X_code.cc   process.

creating a X_strings array in the .cc and X_code enum + extras in the .h.

Possibly automatically appending MAX_X at the end for safety and iterator limit usage.


Amos
--
Please be using
  Current Stable Squid 2.7.STABLE6 or 3.0.STABLE18
  Current Beta Squid 3.1.0.13

Reply via email to