Re: [RFC PATCH 2/8] hex-ll: split out functionality from hex
- From
Calvin Wan <calvinwan@google.com>
- Date
- Jun 28, 2023, 16:55 UTC
- Message-ID
- <CAFySSZA8kC5mN5ZgAnz+RiBXKXQq=z4DZ01QPnmkD50EbQjeeQ@mail.gmail.com>
- In-Reply-To
- <e08d9319-9a4f-bf16-242f-d976aeae32bc@gmail.com>
> I don't think any of the remaining declarations in hex.h depend on the > ones that are moved to "hex-ll.h" so this include should probably be in > "hex.c" rather than "hex.h"
The reason why hex-ll.h is included in hex.h isn't because there might be other declarations in hex.h that depend on it. It is for files that include hex.h to also inherit the inclusion of hex-ll.h. If we moved the inclusion of hex-ll.h to hex.c rather than hex.h, then those files would have to include both hex.h and hex-ll.h. It clarifies whether a file needs all of hex or just the low level functionality of hex.